Print the 9-9 multiplication table using Python loops (including while for) and pythonwhile
I. Print the 9-9 multiplication table in a for Loop
# Note: Due to the poor control of indentation in the browser, please forgive me. images will be imported later.
1.1 lower left corner
For I in range (1, 10 ):
For j in range
Remember when I first touch JS time, see the video teacher wrote a 99 multiplication table, feel good magic, but he wrote in the following half a day or there are various problems, very annoying ah. Now see the garden of the multiplication table in the blog post, out of the past and the memory, so rewrite it again.Alth
I. Experimental requirements:
Given any one of the characters N (n>0), then print the reverse multiplication table of the NXN.
two. Problem solving :#/!bin/bash##define FunctionNxn_fun () {Local i=$1 #定义一个局部变量i控制外层循环While [$i-ge 1];d oLocal j= $i #定义一个局部变量j控制内层循环While [$j-ge 1];d oECHO-E-N "$i * $j =$[i*j]\t"Let j--Doneecho #换行Let i--Done}#mainFlag=$ (echo "$" | sed ' s/[0-9]//g ' | wc-c) #判断脚
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespacenine times nine multiplication table {classProgram {Static voidMain (string[] args) {Console.WriteLine ("nine times nine multiplication table:"); intA =0; for(inti =1; I Ten; i++) {a++; Console.WriteLine ("1*"+ A +"="+ I *1); }
Using a custom function method to implement the 99 multiplication table, a function is a block of code that can be executed whenever it is needed.
To create a PHP function:All functions start with the keyword "function ()".Named function – the name of the function should indicate its function. The function name begins with a letter or an underscore.Add "{" – the part that follows the curly braces of the op
*
* Copyright and version Statement of the procedure
* Copyright (c) 2011, Yantai University Computer College students
* All rights reserved.
* File name: 99 multiplication Table
* Person: Yantai University 2011 Level 114-3 Zhang Zongjia
* Completion Date: 2012 7 months * Date:
* to the task and solution side Description of the metho
After learning the selection cycle, we began to extrapolate, write 3 small demo to try it.
First 99 multiplication table:
/*
* This is a program that prints out the 99 multiplication table Jiujiuchengfabiao
*/
public class jiujiuchengfabiao{
public static void Main (string[] args) {
Loop two 1~9 number multiplie
"Multiplication table" in C Language"The difficulty in using C language to implement a multiplication table lies in how to control the data output format, which is a deep understanding of nested for loops. First, the outer loop is assigned once, and the inner loop is executed once. For the
99 multiplication Table Learning Goal: Understanding for loop, implementing printing, 99 multiplication table its principle. NBSP;1 First Look at the code: Six. PHP Small Project (1) 99 multiplication table
No details. No declareiinteger; jinteger; begin -- 9*9 multiplication table foriin1 .. 9loopforjin1 .. iloopdbms_output.put (I | * | j | I * j | chr (9); endloop; dbms_output.new_line; endloop; end;
No details no declare I integer; j integer; begin -- 9*9 multiplication table for I in 1 .. 9 loop for j in 1 .. I loop d
Do you still remember the 9-9 multiplication table in elementary school? In this section, we will learn how to use npoi through C #
Code Generate an Excel multiplication table. To generate a 9-9 multiplication table, the cycle mu
Php 9-9 multiplication table implementation code
Use the php code to output the 9-9 multiplication table. if you have any need, refer.Do you still remember the dream of a young man? We are familiar with the 9-9 multiplication
/** * 99 multiplication table. * December 21 * Comma problem not resolved */ public class P105 {public static void Main (string[] args){System.out.println ("99 multiplication table Ah ~ ~ ~");int i = initial condition of the 1;//loopwhile (I{int j = 1;while (j{System.out.print (j+ "x" +i+ "=" +i*j+ "," + ' \ t '); Does
Last renewed!
These days I found that some children's shoes still have some problems in outputting the multiplication table. Today I will give you a detailed explanation...
First, let's look at the Code:For ($ I = 1; $ I For ($ j = 1; $ j Echo "$ j x $ I =". $ j * $ I ."";}Echo "}?>Output result:
Well, let's further analyze:
We call the outermost loop a "Trip ":
First trip:
$ I is 1, meeting $ I
While the
The 99 multiplication table for PHP printing mathematics uses two for loops, and for loops is one of the more commonly used in PHP process Control statements, and the structure of the flow control statements is broadly divided into three types: sequential structure, branching structure and cyclic structure. Cyclic structures are most commonly used with while loops, do......while loops, and for loops, which
When learning scripts, you will often be asked if you would write a 99 multiplication table, and now simply write a multiplication table with a Python statement[email protected] python_py]# Cat While3.pyi = 1while (iTest:[[emailprotected]python_py]#pythonwhile3.py1x1=1 1x2=22x2=41x3= 32x3=63x3=91x4= 42x4=83x4=124x4= 16
Last night 99 multiplication table, two for loop can think of, the problem card in the PRINT/PRINTLN output format control, the last search problem is solved.The Java code is as follows:1 Public classmultiplication_table {2 Public Static voidMain (string[] args) {3 //TODO auto-generated Method Stub4 //This program outputs a 99 multiplication
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.