Computer Science, asked by hacker4899, 7 months ago

calculate percantage in c programming​

Answers

Answered by AtharvaAgrawal
0

Answer:

hope it helps u!!!

.........

Attachments:
Answered by simra4825
0

Answer:

\huge\color{yellow}\mathfrak{Hey\:Mate\:Your\:Answer}

Explaination:

Algorithm

Algorithm to find percentage is as follows −

 \fbox{START }\\ \fbox{Step \:1 → \: Collect \: values  \: for  \: part  \: and  \: total}</p><p>   \\  \fbox{Step  \: 2 →  \: Apply  \: formula  \: { percentage = ( part / total ) × 100 }}</p><p>   \\ \fbox{ Step  \: 3 → Display  \: percentage}</p><p> \\ \fbox{ STOP}

Pseudocode

Pseudocode for the algorithm can be written as −

\fbox{procedure\:percentage()}</p><p>\\ \fbox{\:VAR\:value,\:total\:percentage = value / total * 100 }\\ \fbox{RETURN\:percentage\:end\:procedure}

{#include <stdio.h>// int main(){

float percentage;

int total_marks = 1200;

int scored = 1122;

percentage = (float)scored / total_marks * 100.0;

printf("Percentage = %.2f%%", percentage);

return 0;

}

HOPE IT WILL HELP YOU PLZ MRK AS BRAINLIST ☺️☺️☺️

DON'T FORGET TO FØLLØW ME

HV A GOOD DAY

Similar questions