Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- typedef struct Monitors{
- char name[20];
- double size;
- double grade;}Monitor;
- int readMonitor(struct Monitors x){
- printf("\n %s", x.name);
- printf("\n %f, %f", x.size, x.grade);
- }
- int monitorchooser(struct Monitors x, struct Monitors y){
- if(x.grade > y.grade||x.grade == y.grade){
- readMonitor(x);
- }
- else{readMonitor(y);}
- }
- int main()
- {
- Monitor m;
- fgets(m.name, 20, stdin);
- scanf("%f", &m.size);
- scanf("%f", &m.grade);
- readMonitor(m);
- }
Add Comment
Please, Sign In to add comment