c Console program input size limit

Updated on technology 2024-04-18
6 answers
  1. Anonymous users2024-02-07

    Just make an input judgment :

    I just noticed that you are using C, and I started to think that you are using Delphi, which I saw in the Delphi team.

    I'll change it to C. Hehe.

    int z=0;

    while (z!=1) and (z!=2)scanf("%i",&z);

    if (z!=1) or (z!=2)

    printf("You must enter either 1 or 2");

    Here are Delphi's:

    varz :integer;

    beginz:=0;

    while (z<>1) and (z<>2) do until 1 or 2 is entered

    beginreadln(z);

    if (z<>1) or (z<>2) thenwriteln('You must enter either 1 or 2');

    end;end;

  2. Anonymous users2024-02-06

    string s;

    bool check = true;

    Please enter 5 capital letters");

    while (check)

    elsecheck = false;}

    else};

  3. Anonymous users2024-02-05

    int i=0,j=0;First, define two variables to accept the input values if(,out i).

    ",i,j,i*j));

  4. Anonymous users2024-02-04

    **Simpler,Don't comment.,If you don't understand, ask again.,If you're satisfied, adopt it!

    using system;

    namespace test,;}else,c);}else

  5. Anonymous users2024-02-03

    c The entry point for the execution of the program is.

    stathread]

    static void main(string args)where (string args) is the parameter you enter and exit in the console, and you can output the information you require by judging the number of args.

    Example [stathread].

    static void main(string args)

  6. Anonymous users2024-02-02

    I don't see what you mean, but your single and double quotes refer to specific commands.

Related questions
8 answers2024-04-18

The double buffer on the Internet refers to the program of the graphic mode,You are in character mode,If you want to brush fast,Not with double buffer,But to write the screen directly。

10 answers2024-04-18

Basic command: cl showfps 0 1 off Displays the current fps value. >>>More

6 answers2024-04-18

It is not recommended to play these, playing cheats will only ruin the game and have fun,

12 answers2024-04-18

Have you activated the console? If you don't activate it, you first need to press the " " button on the keyboard to open the console, if it is a notebook press " " is invalid, you can also press "enter", that is, enter to open the console. >>>More