Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  1
Language: C/C++
Code:
#include<iostream.h> 
#include<conio.h> 
#include<stdio.h> 
int main() 

int nomer=0; 
float reyt_min=5; 
struct person { 
char famil[50]; 
int InMov,FizRa,TI_mov,KGraf,Progr,Elekt,Arch,BDani,Term,pord; 
float reyting; 
}studenty[10]; 
for (int i=0;i<2;i++) 

cout«"Familia"; cin»studenty[i].famil; 
cout«"InMov";cin»studenty[i].InMov; 
cout«"FizRa";cin»studenty[i].FizRa; 
cout«"TI_mov";cin»studenty[i].TI_mov; 
cout«"KGraf";cin»studenty[i].KGraf; 
cout«"Progr";cin»studenty[i].Progr; 
cout«"Elekt";cin»studenty[i].Elekt; 
cout«"Arch";cin»studenty[i].Arch; 
cout«"BDani";cin»studenty[i].BDani; 
cout«"Term";cin»studenty[i].Term; 
studenty[i].reyting=(studenty[i].InMov+studenty[i].FizRa+studenty[i].TI_mov+studenty[i].KGraf+studenty[i].Progr+studenty[i].Elekt+studenty[i].Arch+studenty[i].BDani+studenty[i].Term); 
studenty[i].reyting/=9; 
studenty[i].pord+=1; 



printf("PIB studenta|InMov|FizRa|TImov|KGraf|Progr|Elekt|Arch|BDani|Term|Reyt\n"); 
printf("------------------------------------------------------------------------\n"); 
for (int j=0;j<2;j++) 

printf("%12s|%5d|%5d|%5d|%5d|%5d|%5d|%5d|%5d|%5d|%4.2f|\n",studenty[j].famil,studenty[j].InMov,studenty[j].FizRa,studenty[j].TI_mov,studenty[j].KGraf,studenty[j].Progr,studenty[j].Elekt,studenty[j].Arch,studenty[j].BDani,studenty[j].Term,studenty[j].reyting); 
printf("------------------------------------------------------------------------\n"); 


for(int k=0;k<2;k++); 

if (studenty[k].reyting<reyt_min) 

reyt_min=studenty[k].reyting; 
studenty[i].pord=k; 



cout«"Naygirshuy student:"«endl«"Nomer="«studenty[i].pord«endl«"Reyting\n"«reyt_min; 
getch(); 
return 0; 
}
Comments: