Di Posting Oleh : Simple Learning
Kategori : C++
Maggie, complete the following tasks. Good luck.
Exercise 1
- What is the structure of the C++ program required to properly compile and run?
- What is the statement that displays a text on a screen (text = string)?
- What do you need to include in the code to display the string on a screen?
- What character do you use to end a statement in C++?
Hint
http://www.cplusplus.com/doc/tutorial/program_structure/
Exercise 2
Write a code that asks a user for two integer numbers. The numbers should be multiplied and result displayed (look at the example below). The program should ask the user if she/he wants to do it again.
Extra Credit
http://www.cplusplus.com/doc/tutorial/variables/
Exercise 2
Write a code that asks a user for two integer numbers. The numbers should be multiplied and result displayed (look at the example below). The program should ask the user if she/he wants to do it again.
- What is the difference between do-loop and do-while-loop?
- What third type of loop do you know and in which situation would you prefer to use it rather than while-loop?
- What type of variable did you use to store user's answer to the question after showing the result?
- What other types of variables are used in C++?
- Can you tell the characters used for addition, subtraction, multiplication, division?
http://www.cplusplus.com/doc/tutorial/variables/
0 Response to "C++ Introduction"
Post a Comment