C-ohjelmointi syksy 2006
Harjoitus 3
Tehtävät käsitellään harjoitustilaisuuksissa 21.9 TO 12-14 salissa B119 ja 22.9 PE 12-14 salissa B119.
%f %.2f %2.f %10.4f %10.5f %-10.5f %010.5f %-+10.5f %+-10.4f %10.0f
x= 1
while ( x <= 10);
x++;
}
for (y = .1; y!=0; y += .1)
printf( "%f\n", y);
switch (n) {
case 1:
printf( "The number is 1\n");
case 2:
printf( "The number is 2\n");
break;
default:
printf( "The number is not 1 or 2\n");
break;
}
n = 1;
while (n < 10)
printf( "%d ", n++);
x
x x
x x x
x x x x
x x x x x
x x x x
x x x
x x
x
.