Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream> #include <cmath> using namespace std; int main() {float x, y; cout <<"x="; cin >> x; if (x==0) cout<<"no solution"; else {y=(x+1)/x; cout.setf(ios::fixed); cout.precision(6); cout << y;} return 0;}
Add Comment
Please, Sign In to add comment