BrokeMansPC

Program 2 - 4.12.2020

Dec 4th, 2020
547
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <math.h>
  3. #include <iomanip>
  4.  
  5. using namespace std;
  6.  
  7. int main(){
  8.     cout << "Program 2 | Veljko Kovacevic IV3" << endl;
  9.     int n, br = 0;
  10.     cin >> n;
  11.     int starost[n];
  12.     for (int i = 0; i < n; i++){
  13.         cout << "Ucenik " << i << " : ";
  14.         cin >> starost[i];
  15.         if(starost[i] >= 18) br++;
  16.     }
  17.     cout << "Ima " << br << " punoletnih";
  18. }
RAW Paste Data