Counting off a list of float numbers is hard when you speak it, but not when you code it! Don't believe me? Then let's try coding just that!
Instructions:
Output
Multiple lines containing a float number.
2.41
143.00
3.14
3.12
0.00
-321.12
-414.12
12312.10
4.10
2.42
.
.
.
#include<stdio.h>
int main(){
float numbers[]={2.41,143.00,3.14,3.12,0.00,-321.12,-414.12,12312.10,4.10,2.42,
2.41,143.00,3.14,3.12,0.00,-321.12,-414.12,12312.10,4.10,2.42,2.41,143.00,
3.14,3.12,0.00,-321.12,-414.12,12312.10,4.10,2.42};
int i;
for(i=0;i<30;i++){
printf("%.2f\n",numbers[i]);
}
getchar();
getchar();
return 0;
}
Comments
Leave a comment