1. Print the prime number between 100~2002. Output multiplication table3. Judging the leap year between 1000---2000#include #include #include int main (){int count = 0;int div = 0;printf ("prime number between output 100-200 \ n");for (int prime = 101; prime{for (div= 2; div{count++;if (Prime%div = = 0)Break}if (Div >sqrt (prime))printf ("%d\n", Prime);}System ("pause");return 0;}#include #include int main (){printf ("Output a n*n
Pre-Knowledge:SEQ: Generating a sequenceSED: pattern space and storage spaceH: Append The contents of the pattern space to the hold space\n G: Overwrite the data in the storage space with the pattern spaceThe mode space used when outputting, storage space is just a scratchpad1, SEQ generated 1, and then added to the SED mode space, H appends the value of the mode space to the storage space, the mode space is 1, the storage space is \n1, and then copied to the mode space, when the mode space is \
The following example prints a 99 multiplication table with a nested for loopFormat: for () {for () {}}is actually taking the inner Loop as the loop body of the outer loop.Package com.forfortest001;public class ForForTestDemo2 {Print 99 multiplication tablepublic static void Main (string[] args) {for (int i=1;ifor (int j=1;jSystem.out.print (i+ "*" +j+ "=" + (I*J
1 PackageCom.czgo;2 3 /**4 * 99 multiplication table5 * 6 * @authorAlanlee7 *8 */9 Public classPrint99 {Ten One Public Static voidMain (string[] args) { A -System.out.println ("99 Multiplication Table"); -System.out.print (""); the //first print out the first line 1-9 - for(inti = 1; I ) { -System.out.print (i + "")); -
/***//**
* Multiplicationtable. Java
* Print and output the 9th multiplication table on the console.
* @ Author codingmouse
* @ Version 0.1
*/
Public class multiplicationtable ...{
Public static void main (string [] ARGs )...{
// Print the title on the console
System. Out. println ("9-9 multiplication table ");
// Th
1. Rectangular full formatCode:1 #完整格式输出九九乘法表2 for I in Range (1,10): 3 for J in Range (1,10): 4 print ("%d*%d=%2d"% (i,j,i*j), end= "") 5 print (" ")Output content:2. Upper Left TriangleCode:1 #左上三角格式输出九九乘法表2 for I in Range (1,10): 3 for J in Range (i,10): 4 print ("%d*%d=%2d"% (i,j,i*j), end= "") 5 Print ("") 6 Output content:Note: Multiplication calculation by row output, compared with the full format, the in
Use the idle to play the multiplication table, want to be like the result:The implementation algorithm is simple, but the idle (python3.7) default line-wrapping output is not easy to implement, it takes a lot of brains.The code is as follows:The *row=0, the 1, the 1th row, is the value of the time.???????????While True:? ? Print ("\ n")???????????? #为特殊输出格式设的换行语句? ? N=0, 1 is the value of 1x=y.??????????? ?
Every person who has ever studied programming has written "HelloWorld."
But the 99 multiplication table, I think, should also be a necessary program for every programming beginner.
This is the implementation of JavaScript, very suitable for beginners!!!
The following are code and comments
Here are some of the things that are covered in the code above
The
Border= the "" property to set t
Recently in the group saw a problem, take out write,
Requirements:
With Html,css, the original JS to achieve the effect of the diagram, first forward output, and then reverse backtracking, and finally stay in the complete picture.
First of all:
HTML Section Code:
It's just this simple line.
CSS code:
#result {
width:550px;
margin:30px Auto;
font-size:0;
Font-family:consolas, "Liberation Mono", Menlo,courier,monospace;
}
#result span{
Display:inline-block;
width:60px;
hei
The following four kinds of 99 multiplication tables of SQL statements written with the while and if conditions
SQL statement implementation--x lower left corner 99 multiplication table
DECLARE @i INT, @j int,@s VARCHAR ()
set @i= while
@i
Results:
SQL statement implementation--x right lower corner 99 multi
One by one to one; one or two to 222 to four; 13 to 323 633 to nine. Do children's shoes look familiar? Yes, when we were kids, everyone had to memorize ... Want to make a 99 multiplication table for your child or student so that he can keep it handy? Here's a small compilation to share with you how to use the simulation table in the Excel2003 of the 99
This is a childhood back of the 99 multiplication table, is the Chinese version, not the digital version, with the Java program printed out.The Java source program is as follows:Package Com.elephant.multiply99table;public class Multiply99table {public static String Convert (int digit) {string[] Digitwords = {"Ten", "One", "two", "three", "four", "five", "six", "seven", "eight", "Nine"};if (Digit The result
In the PHP custom function creation definition is very simple, we just use function space followed by the functions of the name can be, the intermediate function can have parameters and related content, specifically as follows.
Using a custom function to implement the 99 multiplication table, a function is a block of code that can be executed at any time when needed.
To create a PHP function:All functions
From the National Day holiday to today, "linux Command Line and advanced shell programming" has initially learned chapter 10. Basically, I can write some simple process control scripts. Today, an unexpected whim occurred, trying to create a multiplication table of 9*9. After thinking for a long time, I finally got the result. However, it is not mature enough. Then I asked a few friends in the group. I learn
Today in three different ways to achieve the shell script Print 99 multiplication table, the code is as follows Method 1: Use a For loop (a.sh) #!/bin/shfor i in {1,2,3,4,5,6,7,8,9}do to J in {1,2,3,4,5,6,7,8,9} do ((product= $i * $j)) Echo-ne $i \ * $j = $product "\ T" done Echodoneexit 0 Method 2: Use the While loop (b.sh) #!/bin/shi=1j=1while ["$i"-ne]do while ["$j"-ne] Do ((product= $i * $j)) Echo-ne $i
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.