162k views
1 vote
Write a program using integers userNum and x as input, and output userNum divided by x four times. Ex: If the input is: 2000 2

1 Answer

4 votes

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;

}

Step-by-step explanation:

User Adora
by
5.1k points