Answer to Question #214799 in C for tafadzwa

Question #214799

loop that will store 10 percentages in the array


1
Expert's answer
2021-07-07T12:55:04-0400
#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;
}




Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS