Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- int Square(int value){
- int result;
- result = pow(value,2);
- return result;
- }
- int main(){
- int value;
- int result;
- cout << "Entry a value: ";
- cin >> value;
- result = Square(value);
- cout << "The square of " << value << " is: " << result;
- }
Add Comment
Please, Sign In to add comment