-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathSwitchlowNumOnly.c
More file actions
33 lines (26 loc) · 843 Bytes
/
SwitchlowNumOnly.c
File metadata and controls
33 lines (26 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*programmer chase
date 11/5/16
specifications-switch problem. 1. Display the smallest number entered
2. Display the largest number entered
3. Display the sum of the five numbers entered
4. Display the average of the five numbers entered
*/
#include<stdio.h>>
#include<stdlib.h>>
//main funtioin
main() {
//variable declarations
int choice = 0, highNum = 0, lowNum = 0, sum = 0, avg = 0;
//should average number be double?????
printf("enter 5 numbers\n");
scanf_s("%i %i %i %i %i",&lowNum, &highNum, &sum, &avg, &choice);
//use these numbers 18, 21, 17, 44, 9.
scanf_s(" %i", &lowNum);
switch (choice = 0) {
case '1':
printf("%i is lowNum", lowNum);//third line shows smllest
break; //the smallest entered was 1.
}
printf("the smallest number is %i\n", lowNum);
system("pause");
}