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]
3 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]3 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
You can create a negative indent, sometimes called a(n) ________________, by dragging the indent markers on the ruler to the lef
Murljashka [212]
B is the best answer
I hope it’s work
8 0
3 years ago
Select one among the the main categories of computer software, which one is not a category
kakasveta [241]

Answer:

utilities

Explanation:

the other 3 are Cs programs

7 0
3 years ago
In MLA formatting, which of the<br> following is correct?
sveticcg [70]

Answer:

what?

Explanation:

8 0
3 years ago
What is the aspect ratio of this photo?<br> A) 29.97<br> B) 1:1<br> C) 4:3<br> D) 9:16<br> E) 1080p
UkoKoshka [18]

Answer:

1080p

Explanation:

3 0
2 years ago
Why do we need IT certification?
34kurt

Answer:

to enable you get a job easily

8 0
3 years ago
Other questions:
  • The point on the middle of an edge in SketchUp is called a...
    5·2 answers
  • You would like to create a graph that shows how much of your total investments are in stocks, savings, and mutual funds. You sho
    5·2 answers
  • Which of the following terms is computed as cash provided by operations less capital expenditures and cash dividends? A : adjust
    5·1 answer
  • Which of the following is NOT a unit used to measure temperature?
    13·1 answer
  • Which of the following statements about arrays are true?
    10·1 answer
  • How to change the date modified on a word document?
    11·1 answer
  • Which programming languages are the best choices for desktop applications? Select 3 options.
    8·2 answers
  • Where do the projection lines converge in a perspective sketch?
    13·1 answer
  • Have a good christmas. this might not be homework, but i just want everyone to have a good week
    6·2 answers
  • A major hospital uses an agile approach to manage surgery schedules. a large board set up in a common office allows staff to qui
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!