1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alex787 [66]
3 years ago
15

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

Computers and Technology
1 answer:
STatiana [176]3 years ago
3 0

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".

<u>Output:</u>

enter the value of userNum and x :2000 2                                                                                  

1000 500 250 125  

You might be interested in
What are some ways to manage stress? Check all that apply.
Romashka-Z-Leto [24]
Exercise Breathe deeply Take breaks Study at night
7 0
3 years ago
Read 3 more answers
What is the difference, if any, between a Portable Media Player (PMP) and a Digital Media Device (DMD)? PMPs can be analog or di
lara [203]

Answer:

PMPs are typically referred to interchangeably.

Explanation:

3 0
3 years ago
Because health and safety are important in all workplaces, not just hazardous ones, what working conditions must ALL employers p
antiseptic1488 [7]
A since fire extinguishers are legally enforced 
5 0
4 years ago
Read 2 more answers
The illustrations group contains all but a _______​
antiseptic1488 [7]

Answer:

Shapes button

Chart button

Photo button

Pictures button

Explanation:

In Microsoft Word, the illustration group has all the following options apart from the photo button. It can be found in the Insert tab of the Word document. The illustrations group is where you make several adjustments to your Word document by inserting online and offline pictures and clip art, shapes, charts, and screen shots.

6 0
3 years ago
Why is self-esteem important in self-representation
german
Hello! Self-esteem is important in self-representation, because the way you feel yourself can affect how you represent yourself as well. For example, if you have low self-esteem, you may present yourself as sad and shameful. However, if you have high self-esteem, you present confidence and happiness to other people.
3 0
4 years ago
Other questions:
  • When typing in a cell, hitting Tab will bring which result?
    12·2 answers
  • Isabella is a security support manager for a large enterprise. In a recent meeting, she was asked which of the standard networki
    5·1 answer
  • Can embedded computers automate security so you can lock and unlock doors remotely
    15·1 answer
  • "The pkill command terminates _________."
    14·1 answer
  • You are the manager and two employees are having issues with each other. These issues are affecting their happiness and producti
    11·1 answer
  • Which computer device is used to capture or copy a photograph to place in a report?
    14·1 answer
  • A user has connected a USB 3.0 device to a computer using a 3 ft (1m) USB 3.0 cable. However, instead of an expected data transf
    9·1 answer
  • Suppose you have four 500 MB hard drives plus one 2 GB flash drive. How many GB of capacity is this overall?
    12·1 answer
  • A showChar Method
    10·1 answer
  • Point out the correct statement:_____.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!