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]
2 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]2 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
Ayúdenme con estas preguntas son para mañana porfis!!!
kogti [31]

Answer:

i can't understand your language

8 0
2 years ago
FREEE POINTS
BigorU [14]

Answer:

Thank you that's so very kind of you. Hope your having a good day.

3 0
2 years ago
Read 2 more answers
Most computers and many mobile devices, such as smartphones and portable media players, can connect to which kind of network?
Zigmanuir [339]

Answer:

Wifi

Explanation:

because its wifi based

6 0
2 years ago
What is the most recognized and widely used database of published nursing practice literature?
faust18 [17]
That would be the <span>Cumalitive Index to Nursing and Allied Health Literature.</span>
7 0
2 years ago
Write a function, called valFrequency, that given a list of values as a parameter, counts the frequencies for each value in the
Marat540 [252]

Answer:

pray for me i fell sick

Explanation:

i ate a piece of carrot now im blind

7 0
2 years ago
Other questions:
  • Jeremy, a college student, is preparing to give a speech on "Social Responsibilities." He refers to a Web page on a tab using
    10·1 answer
  • Sarah is creating and formatting a newsletter for her school. Which page layout rules should she consider when doing this?
    13·2 answers
  • You've been asked to find the largest number in a range of numbers. Which of the following could you use to find the largest num
    8·1 answer
  • Of the two basic methods of data entry, keyboards use keystrokes to enter data and instructions; what is the nonkeyboard method
    8·1 answer
  • How will you create an email id
    11·1 answer
  • Tanya has received an email, apparently from her bank, stating that some of her records were lost during server maintenance work
    14·1 answer
  • Write a Java program that launches 1000 threads. Each thread adds 1 to a variable sum that initially is 0. You need to pass sum
    11·1 answer
  • Who is tim berners-lee
    14·2 answers
  • What influences my school my church and my leader on my society​
    8·1 answer
  • What is the console.log function for?​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!