Advertisement
Guest User

Davor Damjanovic - version 2

a guest
Nov 15th, 2012
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <cstdlib>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main(int argc, char *argv[])
  7. {
  8.     int test1;
  9.     int test2;
  10.     int rezultattesta;
  11.     int seminarski;
  12.     int esej;
  13.     int ukupno;
  14.     cout<<"Unesite broj bodova na prvom testu: "<<endl;
  15.     cin>>test1;
  16.     cout<<"Unesite broj bodova na drugom testu: "<<endl;
  17.     cin>>test2;
  18.     rezultattesta = test1 + test2;
  19.         cout<<"Unesite bodove vaseg seminarskog rada: ";
  20.         cin>>seminarski;
  21.     cout<<"Unesite bodove vaseg eseja: ";
  22.         cin>>esej;
  23.         ukupno = rezultattesta + seminarski + esej;
  24.  
  25.     if ((rezultattesta >=30) && (ukupno >=60))
  26.     {
  27.    ukupno = rezultattesta + seminarski + esej;
  28.     cout<<"Uspjesno ste polozili predmet imali ste " << rezultattesta << " bodova iz testova. Ukupno imate: " << ukupno << " bodova"<<endl;
  29. }
  30.     else if((rezultattesta <30) || (ukupno <=60))
  31.     {
  32.     cout<<"Niste polozili predmet jer ukupno imate manje od 60 bodova,"<<endl << "ili ukupan broj bodova na testovima ne prelazi 30" <<endl;
  33.          }
  34.        
  35.     system("PAUSE");
  36.     return EXIT_SUCCESS;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement