Output hello world Hello C in C I wrote it wrong in strict accordance with the tutorial, but it wa

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

    It seems that more than one place is wrong...

    Here's what I thought :

    include remove. h

    void main()

    std::cout <<"hello world!hello c++!";Plus the std standard namespace.

    #include

    int main()

    std::cout <<"hello world!hello c++!"The landlord gives a point.。。。 Thank you!

  2. Anonymous users2024-02-06

    include to remove the latter ones. h

    using namespace std; //"cout"is defined in the std namespace and must contain that namespace, void main().

    cout <<"hello world!hello c++!";

    Or it can be right"cout"Stand-alone:

    std::cout <<"hello world!hello c++!";

  3. Anonymous users2024-02-05

    #include

    using namespace std;

    void main()

    cout<<"hello world!hello c++!""It's the right way to write it, there's no such thing. H,Let's talk about it if you have a question.。。。

  4. Anonymous users2024-02-04

    I can run it, you can try a different file name, and select C++ source file when creating a new one

  5. Anonymous users2024-02-03

    h removed. using namespace std before main;

    I guess it's okay.

  6. Anonymous users2024-02-02

    **As follows: include

    int main(void)

    printf("hello, world!")

    return 0;

    First, first of all, open our visual C++ software, I use the Chinese version, the main interface of the software is shown in the following figure:

    1. Then click on the file in the toolbar above, there is a new menu in it, and then we can set up our workspace, as shown in the following figure:

    2. Then click OK step by step by default, and then the workspace will be established.

    Second, next, click the file under the toolbar, there is a new menu in it, click it, and the dialog box shown in the following figure appears:

    1. Click OK to create a mini-program, and then we can write our hello world mini-program. At this time, we need our vc++ to compile this program, and only run this program without errors, the compilation button and the run button are at the red arrow in the following figure:

    2. Or you can click the compilation menu item under the formation toolbar, and then click the execute menu item, there are also shortcut keys, press Ctrl+F7 to compile this program, and press Ctrl+F5 to run this program. If there is no error in compilation, click the Run button and see the following figure:

  7. Anonymous users2024-02-01

    printf("hello,world");printf is the system output function that is used to print text to the console.

    #include""Header file for the standard input-output library.

    #include""The console input input library header file.

    #include

    intmain()

    printf("helloworld!");Output helloword!

    return1;Return 1

  8. Anonymous users2024-01-31

    Summary. Here's the output in C"hello world"and contains the main function and the return value of 0: c include int main() where include is to contain the input and output library header file, int main() represents the main function, printf("hello world");is the output"hello world", n for line breaks, return 0; Indicates that the return value is 0, indicating that the program ended normally.

    Language implementations output hello world"+int main()+return 0:}

    Here's the output in C"hello world"and contains the main function and the return value of 0: c include int main() where include is the header file containing the input and output library, int main() represents the main function, printf("hello world");is the output"hello world", n for line breaks, return 0; Indicates that the return value of the base rotten mind is 0, indicating that the program ends normally.

    The function of the following program is to output 4 data per line to enter the sock and let the skid carry out array a. Please add a procedure...int main0eint iue[20];for (i-q;ik20:

    i++)4 straight++)if( printe("%3dae[d]):4return oi4 to determine whether a line break is required.

    The following is an addition to the full program: include int main() return 0; The function of the program is to define an informing array a, and output the meta-mammoths in the array a in the form of 4 per line. The program first initializes the sock array a, then iterates through the array a with a for loop, outputs each element in the array sequentially, and wraps after each 4 elements.

    Describe the problem in the text

    Write a program that assigns values to the 5 elements in array a via the keyboard and outputs the maximum and minimum values in it. ·

    The following is an example program that implements this function: c include int main() if (a[i] %d", min); return 0;This program enters 5 integers from the keyboard and stores them in turn into the array a. During the input process, the maximum and minimum values are recorded at the same time. Finally, the program outputs the maximum and minimum values.

  9. Anonymous users2024-01-30

    #include

    void main()

    Then you can debug with VC++ and you're good to go.

  10. Anonymous users2024-01-29

    printf("hello,world");printf is the system output function that is used to print text to the console.

    #include""Header file for the standard input-output library.

    #include""The console input input library header file.

    #include

    intmain()

    printf("helloworld!");Output helloword!

    return1;Return 1

  11. Anonymous users2024-01-28

    The c language ** is as follows:

    include contains standard input and output files.

    int main() to write the main function main().

  12. Anonymous users2024-01-27

    I think it's better to read a book.。。。

    include contains header files.

    The int main() main function returns the int type, and printf is the output function contained in it.

    return 0 0 0 is the int type, without this sentence, the compilation may not pass.

    If you are going to learn C, read the book, the basics are important.

  13. Anonymous users2024-01-26

    include standard library header file, when the program is executed, the corresponding ** in the standard library will replace this sentence.

    int main() program entry main function printf("hellow world"This printf is also a function that is used to output things.

    return 0;Yes, the corresponding int mian() function is int needs to return a value, if it is void main() void, it does not need to return a value.

  14. Anonymous users2024-01-25

    include calls the library file, in order to call the printf function in the main function.

    int main()

  15. Anonymous users2024-01-24

    include--- contains the standard library header file, that is, the header file where printf is located.

    int main() main function, the entry point of the main function of the program.

    This is the simplest and most introductory example of any language, so learn it.

  16. Anonymous users2024-01-23

    What do you mean by asking?

  17. Anonymous users2024-01-22

    Language fundamentals (writing and running helloworld cases).

  18. Anonymous users2024-01-21

    #include

    int main(void)

    It's a simple C program.

    The first line indicates that the program uses this library.

    int main(void) is a function, i.e., given an input, the program executes the corresponding ** and returns an output. main is the function name; In parentheses are arguments, i.e., the inputs received by the function, and void means that there is no input to the function; int indicates that the type of the return value of this program is an integer type. In C, a program starts with the main function, and in layman's terms, executing a program starts executing the main function.

    The next curly brace indicates that the content in the curly brace is the content of the main function.

    printf is also a function, in layman's terms, it is used to print the content of parameters to the screen. The printf function is defined in this library, which is why include is written in the first place.

    A semicolon after a statement indicates that the statement ends here. This is followed by the next statement.

    return 0 indicates that the main function returns 0.

Related questions
9 answers2024-04-10

However, it is clear that this is problematic because variable a is not assigned at all. >>>More

4 answers2024-04-10

#include

main() >>>More

11 answers2024-04-10

srand(int) is used to set the seed, and then returns a random value each time rand(). >>>More

3 answers2024-04-10

Heada and headb are both singly linked lists with leading nodes. In this algorithm, we delete the common elements from the ith element in the heada linked list, and then insert the single-linked list heada before the jth element of the headb. >>>More