-
This is a must to learn any language, generally requires the use of for loop execution, graphics can be smoothly output, for loop mastery. Let's take a straight triangle as an example:
int i, j, k;
for ( i = 1 ; i <= 10;i++) outputs a total of 10 lines of graphics.
for ( k = 1; k <= 5; k++)" ");
In the previous sentence, a number of spaces are output before each line, and this cycle directly determines the shape of the graph.
for ( j = 1; j <= i; j++ "* ");
In the previous sentence, each line outputs a number of asterisks.
After each line is output, a line break is forced.
Other triangles, similarly, adjust the loop conditions or values of k and j, you can get what you want, and debug it yourself.
-
The input method is available on the small window with a right-click special symbol
There are a whole bunch of words in the doc menu caret symbols.
-
There is no such thing as a def because the three moving points are on the edge of abc, and the three segments of de df ef are within the range of abc, and there is obviously s def if and only if efd coincides with abc, and the two areas are equal so when they do not coincide, the area of def is infinitely close to the area of abc, but it will not be equal.
-
Just use the loop output.
using system;
namespace consoledemo;}}
-
namespace xx
int x=1;
while(x<=2*i-1)
);i++;
k--;Trust me, absolutely no problem.
-
Give you a diamond and see for yourself.
Handful; Changed to ; That's it.
for (int j = 1; j <= 10; j++)for (int i = 1; i <= 2 * j - 1; i++)
for (int j = 1; j <= 10; j++)for (int i = 19 - j * 2; i >= 1; i--)
-
The main changes are the removal of the semicolon after for, and the fact that the inner and outer loops do not wrap.
The top one is worse than one* to tune it yourself.
for (j = 1; j <= i; j += 2);}
-
#include
#definen5
main()
You can change the length of the regular triangle by changing the value of n under define (the current value is 5), and the program I did is a solid triangle.
-
include file contains command.
void main() math library}
-
using system;
using ;
static void main(string args)const int row = 5;Customize the number of rows.
Bucket const char ch = custom filled triangle symbol.
Splice rows. StringBuilder str = new StringBuilder();
Loop the output line.
for (int i = 0; i < row; +i);
Search }
-
for i = 1 to 9
for j = i to 9
print tab(8 * j - 1));j & "*" & i & "=" & i * j;
next j
printnext i
The upper right triangle is inverted, and the upper left triangle changes "for j = i to 9" to "for j=1 to 10-i" and that's OK!
-
'Left inverted triangle.
private sub command1_click()dim bk as string
print tab(35); "Ninety-nine multiplication table"
for j = 1 to 9
for i = j to 9
print vbtab;
bk = i & "x" & j & "=" & i * jprint bk;
next i
printnext j
end sub
Three feet to the right. private sub command2_click()dim bk as string
print tab(35); "Ninety-nine multiplication table"
for j = 1 to 9
for i = j to 9
print vbtab;
bk = i & "x" & j & "=" & i * jprint bk;
next i
printfor i = 0 to j - 1
print vbtab;
next i
next j
end sub
Both deltas and impact fans can be classified as alluvial plains. >>>More
In fact, it is a natural phenomenon caused by a magnetic field。Due to its beautiful and rich nature and mysterious and unknown world, the ocean has always attracted people to approach it. The ocean not only surprises us, but also unintended harm and unsolved mysteries that plague scientists. >>>More
Sugar Triangle is a Chinese-style noodle dish made with brown sugar and noodles. The sugar triangle is called "sugar clip" or "sugar triangle" in our Linyi, and it is generally done during the Chinese New Year, and it is usually not done many times, because after all, it is a sweet, unlike steamed buns that need to be eaten every day. The picture below is a sugar clip and a large dumpling made by my mother-in-law. >>>More
Using sina + sinb = 2 sin((a+b) 2)cos((a-b) 2
sin(7c)-sin(5c)=sin(7c)+sin(-5c)=sinc >>>More
Absolutely. :number): The return values of number are all in radians. >>>More