Solution for Exercise 12-1
ex1201
#include <stdio.h>
int main()
{
int highscore1,highscore2,highscore3;
printf("Your highest score: ");
scanf("%d",&highscore1);
printf("Your second highest score: ");
scanf("%d",&highscore2);
printf("Your third highest score: ");
scanf("%d",&highscore3);
puts("Here are your high scores");
printf("#1 %d\n",highscore1);
printf("#2 %d\n",highscore2);
printf("#3 %d\n",highscore3);
return(0);
}
Output
Your highest score: 750
Your second highest score: 699
Your third highest score: 675
Here are your high scores
#1 750
#2 699
#3 675
Notes
* I bet my scores were higher than yours.
Copyright © 1997-2025 by QPBC.
All rights reserved
