Can Somebody help me


Assume you are trying to rank NFL teams based on the percentage of games they win in a season. The rank of a team is determined from the percentage as follows.
<50: Tier 3 >50 but <70: Tier 2 >70: Tier 1

a) Prompt user to enter the number games played and won by a team. b) Find the percentage of winning.
c) Output to screen the percentage and rank of the team.



This is what I have so far


#include <stdio.h>
int main()
{
int win,totalNumberOfgame;
float winningPerctange;
printf("Please enter number of game win and total number of game played by team respectively\n");
scanf("%d%d",&win,&totalNumberOfgame);
winningPerctange=(float)win/totalNumberOfgame;
printf("winningPerctange=%.3f\n", winningPerctange*100);
if(winningPerctange<50)
printf("Tier 1\n");
else if(winningPerctange>=50&&winningPerctange<70)
printf("Tier 3\n");
else if(winningPerctange>=70)
printf("Tier 2\n");
return 0;
}
/*output
:-
Please enter number of game win and total number of game played by team respectively
4
9
winningPerctange=44.444
Tier 1

*/
Topic archived. No new replies allowed.