Answer to Question #208817 in C for jason

Question #208817

Code a program to get an unknown number of test percentages from the user. Accept percentages until the user enter a percentage of -99. This number ( -99) indicates the end of the data and must not be used as part of the calculations.


1
Expert's answer
2021-06-20T08:12:09-0400
#include <stdio.h>
#include<stdbool.h>
int main(void) {
    int p;
    while(true)
    {
        printf("Enter a percentage: ");
        scanf("%d",&p);
        if(p==-99){       
            break;
        }
    }
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