Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- struct mekat {
- int vektori[10];
- double mesatare1() {
- int S = 0;
- for (int i = 0; i < 10; i++)
- S += vektori[i];
- return (double)(S / 10);
- }
- void mbushVargun() {
- for (int i = 0; i < 10; i++)
- {
- cout << "Shkruani antarin e " << i + 1 << ": ";
- cin >> vektori[i];
- }
- }
- void shtypantaret() {
- for (int i = 0; i < 10; i++)
- cout << "Antari i " << i << ": " << vektori[i] << endl;
- }
- };
- int main() {
- mekat mekat1;
- mekat1.mbushVargun();
- mekat1.shtypantaret();
- cout << "Mesatarja eshte " << mekat1.mesatare1();
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement