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
tresset_1 [31]
2 years ago
7

Write a program using integers userNum and divNum as input, and output userNum divided by divNum three times.

Computers and Technology
1 answer:
riadik2000 [5.3K]2 years ago
7 0

Answer:

Follows are the code to this question:

#include <iostream>//header file

using namespace std;

int main() //defining main method

{

int userNum, divNum;//defining integer variable

cin>> userNum >> divNum;//input values

cout <<"First-time divide: "<<userNum / divNum<<endl;//divide value First time  

cout <<"Second-time divide: " << userNum / divNum/divNum<<endl; //divide value Second time

cout<<"Third-time divide: "<< userNum /divNum/divNum/divNum<<endl;//divide value Third time

return 0;

}

Output:

2000

2

First-time divide: 1000

Second-time divide: 500

Third-time divide: 250

Explanation:

In this code two integer variable "userNum and divNum" is declared that uses the input method to input value from the user-end, and after input the value it divides the "userNum by divNum" three times, that is defined as follows:

In this code, the user input the value 2000 and 2, in the first divides it will give 1000, in the second time divide it will give 500, and in the third time it will give 250.

You might be interested in
What is the energy conversion of solar water heaters?
Gelneren [198K]
A liquid-to-liquid heat exchanger uses a heat-transfer fluid that circulates through the solar collector, absorbs heat, and then flows through a heat exchanger to transfer its heat to water in a storage tank. Heat-transfer fluids, such as antifreeze, protect the solar collector from freezing in cold weather.
7 0
3 years ago
A strategy to solve a logic problem is to break it into steps. Using the drop-down menu, complete these sentences about solving
PSYCHO15rus [73]
I think the answer is 3!!
3 0
3 years ago
Read 2 more answers
1. In Access, a template is which of the following? a. A database to manage contacts b. Where a database is stored c. Two tables
sweet [91]
Where a database is stored
7 0
3 years ago
Do software engineers save millions of dollars in usa
SCORPION-xisa [38]
Yes. They make a lot of money. So eventually after saving your Money, you will make a least 1 million dollars or more.
4 0
2 years ago
Pls someone help me with these four questions
ipn [44]

Answer:

16. Grace Hopper. 1959.

8 0
2 years ago
Other questions:
  • Which of the following jobs are most likely to be in greater demand due to the increasing prevalence of mobile computing? deskto
    13·1 answer
  • Pamela finds that she is constantly spelling the word “color” as “colour” when she is typing. Even though this is how the word i
    11·1 answer
  • When it comes to the best possible security for your wireless router, be sure to use WEP encryption to ensure that your transmis
    14·1 answer
  • 7.) Title text boxes on every slide must be the same format. <br> A. True <br> B. False
    15·2 answers
  • Tradegy deals with _____
    14·1 answer
  • Speed(?)
    5·1 answer
  • Write an alogrithm to display the first ten even numbers​
    6·1 answer
  • What what do these two parts of the lift do ​
    14·1 answer
  • A local pizza shop is selling a large pizza for $9.99. Given the number of pizzas to order as input, output the subtotal for the
    12·1 answer
  • Integrity constraints are enforced by Group of answer choices A. The operating system B. The end user C. The database designer D
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!