You are on page 1of 2

Republic of Yemen Subject : programming1 .

A Time : 1 hour.
Alrasheed University
Faculty of Computer & Information Technology
Level :1_IT.
Final Exam
Name:……………………………………………………………………………………………………………………………………

Q1:Write a program that enter two values x and y then the program should
5
determine if the summation of the two larger than 100 or less.
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
………………………………………………………………………………………………….

Q2: Write a program that print the following (using loops):


7
1,8,15,n,29,n,43,50
……………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………
Name:……………………………………………………………………………………………………………………………………
page 1 of 2

Q3:Write the output of the following: (Show the steps)


8

int a[][4]={{1,2,3,4},{5,8,9,10},{6,5,8,9},{4,6}};

for(int i=0;i<4;i++)
for(int j=0;j<4;j++)
if(i==j)
a[i][j]=100;

for(int i=0;i<4;i++)
{
for(int j=0;j<4;j++)
cout<<a[i][j]<<"*\t";
cout<<endl;
}

Best Wishes……. T\Sondos Saif

You might also like