Vtora zadaca

mail@pastecode.io avatar
unknown
plain_text
2 years ago
571 B
0
Indexable
Never
#include <iostream>

using namespace std;

int main()
{
int nof,god,nag,indeks, a,b,c,d,e,f;
double prosek;
cin>>indeks;
cin>>a>>b>>c>>d>>e>>f;
prosek=(a+b+c+d+e+f)/6.0;
cout.setf(ios::fixed,ios::floatfield);
cout.precision(3);
cout<<"Prosek:"<<prosek<<endl;
cout<<"Student:"<<indeks<<endl;
nof=indeks;
while (nof>= 100)
{
   nof/=100;
}
if(nof=15)
{
    cout<<"5 godina"<<endl;
}
else
if(nof=16)
{
    cout<<"4 godina"<<endl;
}
else
if(nof=17)
{
    cout<<"3 godina"<<endl;
}

 if(prosek>9.5)
 {
     cout<<"Nagraden: 1";
 }
 else cout<<"Nagraden 0"<<endl;
 return 0;
}