iopkid.blogg.se

Write a program in shell to print odd number
Write a program in shell to print odd number




Where g++ is the name of GCC C++ compiler -o option specifies the output filename (" hello.exe" for Windows or " hello" for UNIX/Linux/Mac) " hello.cpp" is the input source file. UNIX/Linux/Mac (Bash shell) - Build "hello.cpp" into "hello" #include // Needed to perform IO operations

write a program in shell to print odd number

* First C++ program that says hello (hello.cpp)

write a program in shell to print odd number

You should choose a filename which reflects the purpose of the program. A C++ source file should be saved with a file extension of ". Step 1: Write the Source Code: Enter the following source codes using a programming text editor (such as NotePad++ for Windows or gedit for UNIX/Linux/Mac) or an Interactive Development Environment (IDE) (such as CodeBlocks, Eclipse, NetBeans or Visual Studio - Read the respective "How-To" article on how to install and get started with these IDEs).ĭo not enter the line numbers (on the left panel), which were added to help in the explanation. Let us begin by writing our first C++ program that prints the message "hello, world" on the display console.

write a program in shell to print odd number

Getting Started - Write our First Hello-world C++ Program






Write a program in shell to print odd number