Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- double stud(double arg1, double arg2);
- int main()
- {
- double a,b,c;
- cin >> a;
- cin >> b;
- c = stud(a, b);
- cout << c*c;
- }
- double stud(double arg1, double arg2)
- {return (arg1+arg2)/2;}
- int main()
- {int a,b;
- bool c=true;
- cout<<"vvedite chislo";
- cin>>a;
- for (b=2;b<sqrt (double(a));b++)
- {
- if (a%b==0)
- c=false;
- }
- if(c)
- cout<< "Yes";
- else
- cout<<"No";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement