Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cout << "Please enter a floating-point valuen";
- int n;
- cin >> n; // read a double from the keyboard into n
- cout << "n == " << n
- << "nn+1 == " << n + 1
- << "nthree times == " << 3 * n
- << "ntwice n == " << n + n
- << "nn squared == " << n * n
- << "nhalf of n == " << n / 2
- << "nsquare root of n == " << sqrt(n)
- << 'n';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement