! 57
10.2 I=0;
J=0;
for(;;)
{ K=2*I*J;
if(K>10)
break;
cout<<I<<J<<K<<'n';
if(I+J>5)
break;
I++;
J++;
}
cout<<K<<'n';
10.3 I=5;
for(;;)
{ cout<<I;
I -=2;
if(I<1)
break;
J=0;
for(;;)
{ J++;
cout<<J;
if(J>=I)
break;
}
cout<<"###n";
}
cout<<"***n";
11. Write a prgram to read a sequence of positive integers and to print the greatest of thest. Use a
negative to signal the end of the input data.
12. Write a program that reads a sequence of positive real numbers and computes their average. A
negative number to signal the end of the input data.
ศิริชัย นามบุรี การเลือกทํา