You are on page 1of 1

‫ علوم حاسوب‬: ‫القسم‬ ‫الجوهىريت اليونيت‬

‫وزارة التعلين العالي والبحث العلوي‬


‫ اساسيات البرمجة‬: ‫الماده‬
‫جاهعت الضالع‬
: ‫األسم‬
‫كليت العلىم اإلنسانيت والتطبيقيت‬
Choose the best answer:

1) The object used to print information on the screen in C++ program is:

a) cin b) cout c) none

2) The ………………..object inputs values from the keyboard

a) cin b) cout c) none

3) Every C++ statement ends with a…………. .

a) Semicolon b) Full stop c) Under score

4) The value of x after this statement x = 7 + 3 * 6 / 2 - 1; is performed

a) 29 b) 15 c) 17 e)

A single-line comment starts with

a) /* */ b) // c) /

5) The ……… represents the newline character, which causes the cursor to position to the
beginning of the next line on the screen.

a) \n b) \t c) \ a

- Correct the mistakes:


#include<
Using name space std;
Void main [ ]
{ Int x;y,
Cout<<enter the tow numbers>>endl;
Cin>>x<<y;
X=y+z,
Cout<<x;}

Answer one of the following questions:

1. Write Write a program to print even integer number from 1 to 20 using for statement

2. Write a C++ program that reads an integer and determines and prints whether it is
positive or negative.

3. Write a C++ Program like a calculator for the basic operations, the user enters two
numbers and operation, the program calculates the result by switch statement.

‫زينب الصيادي‬/‫أ‬ ‫خالص امنياتي لكم بالتوفيق والنجاح‬

You might also like