Respuesta :
Answer:
// here is code in c++.
// include header
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{
// variables to read input
int userNum,x;
cout<<"enter the value of userNum and x :";
// read the input from user
cin>>userNum>>x;
// divide the userNum with x 4 times
for(int a=0;a<4;a++)
{
userNum=userNum/x;
cout<<userNum<<" ";
}
cout<<endl;
return 0;
}
Explanation:
Declare two variables "userNum" and "x". Read the value of these. Run a for loop 4 time and divide the "userNum" with "x" and print the value of "userNum".
Output:
enter the value of userNum and x :2000 2
1000 500 250 125
Answer:
#include <iostream>
using namespace std;
int main() {
int userNum;
int x;
cin>> userNum >> x;
cout << userNum / x <<" "<< userNum / x / x<< " "<< userNum / x / x /x<<endl;
return 0;
}
Explanation: