Advertisement
Guest User

Untitled

a guest
Sep 6th, 2014
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include<stdio.h>
  2. int main() {
  3. int n,m, s;
  4. int scanf(m);
  5. for (n=2; n<m; n++);
  6. if ((m%n==0)||(m<=1))
  7. printf("число не является простым");
  8. else
  9. printf("число является простым");
  10.  
  11.  
  12. s=0;
  13. while (m>=0)
  14.  
  15. {
  16. m=m/10;
  17. s=s+m%10;
  18. }
  19.  
  20. printf(S);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement