Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- int main()
- {
- string s="yes";
- double x;
- While (s=="yes");
- {
- cout << "Enter your x: ";
- cin>>x;
- if(cin.good()==1&&
- x>=0)
- {
- cout<<sqrt(x*cos(1.0/8.0))<<endl;
- }else
- {
- cout<<"ERROR"<<endl;
- cin.clear();
- cin.sync();
- }
- cout<<"Якщо хочеш продовжити введи - yes "
- cin>>s
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement