Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<conio.h>
- using namespace std;
- int main()
- {
- float a,b,c;
- char d;
- //b=0;
- while(d!='n')
- {
- cout<<"podaj a\n";
- cin>>a;
- system("cls");
- if ((1<a)&&(a<6))
- {
- b+=a;
- c++;
- }
- cout<<"chcesz dalej liczyc t/n";
- cin>>d;
- system("cls");
- }
- b=b/c;
- cout<<"rowna sie "<<b;
- getch();
- return(0);
- }
Add Comment
Please, Sign In to add comment