The CDOS window outputs a straight triangle, a regular triangle, an inverted straight triangle to a

Updated on Financial 2024-05-06
12 answers
  1. Anonymous users2024-02-09

    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.

  2. Anonymous users2024-02-08

    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.

  3. Anonymous users2024-02-07

    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.

  4. Anonymous users2024-02-06

    Just use the loop output.

    using system;

    namespace consoledemo;}}

  5. Anonymous users2024-02-05

    namespace xx

    int x=1;

    while(x<=2*i-1)

    );i++;

    k--;Trust me, absolutely no problem.

  6. Anonymous users2024-02-04

    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--)

  7. Anonymous users2024-02-03

    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);}

  8. Anonymous users2024-02-02

    #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.

  9. Anonymous users2024-02-01

    include file contains command.

    void main() math library}

  10. Anonymous users2024-01-31

    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 }

  11. Anonymous users2024-01-30

    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!

  12. Anonymous users2024-01-29

    '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

Related questions
10 answers2024-05-06

Both deltas and impact fans can be classified as alluvial plains. >>>More

13 answers2024-05-06

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

11 answers2024-05-06

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

13 answers2024-05-06

Using sina + sinb = 2 sin((a+b) 2)cos((a-b) 2

sin(7c)-sin(5c)=sin(7c)+sin(-5c)=sinc >>>More

14 answers2024-05-06

Absolutely. :number): The return values of number are all in radians. >>>More