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
Check the devices that are external peripheral devices:
irina [24]

Answer:

Mouse, and keyboard

Explanation:

Common Sense

6 0
3 years ago
If you experience a denial-of-service attack, you can use firewall logs to determine the _______ from which the attack originate
suter [353]
<span>The answer is IP address.  If you experience a denial-of-service attack, you can use firewall logs to determine the IP address from which the attack originated.</span>
6 0
3 years ago
Read 2 more answers
A box contains two types of colored pencils: red and blue. it also has a few pens. you can pick only one item at a time. if you
kipiarov [429]
Xor because in the XOR gate, if both inputs are the same, the output is zero but if they're different, the output is one
3 0
4 years ago
Read 2 more answers
Which of the following methods causes the next slide to be displayed during a slide show? Select all the options that
photoshop1234 [79]
B (spacebar) and D (right mouse button)
3 0
3 years ago
Read 2 more answers
An email ____ consists of the computers and software that provide email services.​
Dima020 [189]
I think it could be email server?
3 0
3 years ago
Other questions:
  • Universal containers has included its orders as an external data object in to Salesforce. You want to create a relationship betw
    7·1 answer
  • What type of media can be edited and published by anyone?
    6·2 answers
  • Write a program that removes all spaces from the given input. Ex: If the input is: Hello my name is John. the output is: Hellomy
    11·1 answer
  • Which feature do we most likely use to quickly change the background, fonts, and layout?
    12·1 answer
  • Match the term to the correct definition.
    6·1 answer
  • Look at the logos below, decide which one would be the most suitable to use for a Cooking App? Please explain your reason below.
    9·1 answer
  • Which option correctly identifies if the researcher’s approach was the best start in the following scenario and explains why?
    10·2 answers
  • Create a set of functions that compute the mean, median, and mode of a set of
    8·2 answers
  • Write two statements to assign numApples with 10 and numOranges with 3. Sample output for given program: Apples: 10 Oranges: 3
    7·1 answer
  • What can you achieve if you divide your search engine marketing account into relevant campaigns and ad groups?.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!