for(int stud=1;____(a)____;stud++)
{
cout<<"Enter Student name:";
____(b)____name;
for(int mark=1;mark<=3;____(c)____)
{
cout<<"Enter assigment marks:";
cin>>marks;
total=____(d)____+marks;
}
}
cout<<"Total marks are"<<____(e)____;
answer
(a) stud<=3
(b) cin>>
(c) mark++
(d) total
(e) total
2) Based on the short code below :
Change for loop statement below to while loop
for(x=1;x<=5;x++)
cout<
answer
x=1;
while(x<=5)
cout<
3) Write the code using while loop to get the output as below !
20
15
10
5
answer
x=20
while(x<=5)
cout<<" "<
No comments:
Post a Comment