Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdio>
- using namespace std;
- int main()
- {
- //zmienne
- float tab[5];
- float suma = 0;
- float srednia;
- //petla for
- for(int i = 0; i < 5; i++)
- {
- float liczba = tab[i];
- cin >> liczba;
- suma += liczba;
- }
- srednia = suma / 5;
- cout << "Srednia wynosi: " << srednia << endl;
- getchar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement