Guest User

Untitled

a guest
Dec 15th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include<iostream>
  2. #include<conio.h>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. float a,b,c;
  9. char d;
  10. //b=0;
  11.  
  12. while(d!='n')
  13. {
  14.  
  15. cout<<"podaj a\n";
  16. cin>>a;
  17. system("cls");
  18. if ((1<a)&&(a<6))
  19.  
  20. {
  21. b+=a;
  22. c++;
  23. }
  24. cout<<"chcesz dalej liczyc t/n";
  25. cin>>d;
  26. system("cls");
  27. }
  28. b=b/c;
  29. cout<<"rowna sie "<<b;
  30.  
  31.  
  32.  
  33. getch();
  34. return(0);
  35. }
Add Comment
Please, Sign In to add comment