mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
replace printf & scanf with std::cout and std::cin
This commit is contained in:
parent
e52da1db6e
commit
c559ebcedb
@ -81,10 +81,10 @@ void power(int x, int n) {
|
||||
/** Main function */
|
||||
int main() {
|
||||
int exponent, base;
|
||||
printf("Enter base ");
|
||||
scanf("%id \n", &base);
|
||||
printf("Enter exponent ");
|
||||
scanf("%id", &exponent);
|
||||
std::cout << "Enter base ";
|
||||
std::cin >> base;
|
||||
std::cout << "Enter exponent ";
|
||||
std::cin >> exponent;
|
||||
power(base, exponent);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user