Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
140
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 <cmath>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int a, p, max, i=0, suma, d;
  8.  
  9. do{
  10. cout<<"Podaj p z przedzialu (0,9>\n";
  11. cin>>p;
  12. }while(p=<0&&p>9);
  13. cout<<"Wpisuj liczby";
  14. do{
  15. cin>>a;
  16. if ((a%p)=0){
  17. i++;
  18. suma=suma+a
  19.  
  20. };
  21. }while(a>0)
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement