Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- #include <stdio.h>
- typedef struct{
- int freq;
- int ram;
- int hd;
- char processor[256];
- }
- computer;
- computer c[3];
- int main(){
- c[0].ram = 8;
- c[0].hd = 500;
- c[0].freq = 3;
- c[1].ram = 4;
- c[1].hd = 500;
- c[1].freq = 3;
- c[2].ram = 2;
- c[2].hd = 1000;
- c[2].freq = 9;
- int aux=0;
- for(int i=0;i<3;i++)
- if (c[i].freq>aux)
- aux=c[i].freq;
- printf("%i\n",aux);
- for(int i=0;i<3;i++)
- if (c[i].freq==aux)
- printf("calc no %d este server ", i);
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement