Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4. double stud(double arg1, double arg2);
  5. int main()
  6. {
  7.   double a,b,c;
  8. cin >> a;
  9. cin >> b;
  10. c = stud(a, b);
  11. cout << c*c;
  12. }
  13. double stud(double arg1, double arg2)
  14. {return (arg1+arg2)/2;}
  15.  
  16.  
  17.  
  18. int main()
  19. {int a,b;
  20.     bool c=true;
  21. cout<<"vvedite chislo";
  22.   cin>>a;
  23.   for (b=2;b<sqrt (double(a));b++)
  24.   {
  25.    if (a%b==0)
  26.       c=false;
  27.  
  28. }
  29.   if(c)
  30.       cout<< "Yes";
  31.   else
  32.       cout<<"No";
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement