loop that will store 10 percentages in the array
#include<stdio.h>
int main(){
float percentages[10];
int i=0;
for(i=0; i<10; i++){
printf("Enter the percentage %d: ",(i+1));
scanf("%f",&percentages[i]);
}
printf("\n\n");
for(i=0; i<10; i++){
printf("%.2f ",percentages[i]);
}
getchar();
getchar();
return 0;
}
Comments
Leave a comment