View difference between Paste ID: JatcBgYc and 3d632TFW
SHOW: | | - or go back to the newest paste.
1
#include <iostream>
2
#include <math.h>
3
#include <iomanip>
4
5
using namespace std;
6
7-
	float x1,x2,y1,y2,d;
7+
8-
    cout << "Program 1 | Veljko Kovacevic IV3" << endl;
8+
	cout << "Program 2 | Veljko Kovacevic IV3" << endl;
9-
    cout << "X1: ";
9+
    int n, br = 0;
10-
    cin >> x1;
10+
    cin >> n;
11-
    cout << "Y1: ";
11+
    int starost[n];
12-
    cin >> y1;
12+
    for (int i = 0; i < n; i++){
13-
    cout << "X2: ";
13+
        cout << "Ucenik " << i << " : ";
14-
    cin >> x2;
14+
        cin >> starost[i];
15-
    cout << "Y2: ";
15+
        if(starost[i] >= 18) br++;
16-
    cin >> y2;
16+
    }
17-
    d = ((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1));
17+
    cout << "Ima " << br << " punoletnih";
18-
    d = sqrt(d);
18+