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 is a geotag?
Angelina_Jolie [31]

Answer:

It helps to give the geographic location of photos.

Explanation:

A geotag is added into the photography information when it's taken.  That info is part of the EXIF information of a photo that lists a bunch of data related to the photo, like the camera brand, model, the aperture, the speed, the ISO, and so on.

That's assuming the GPS info is available of course, but if it's taken by a phone, it has the GPS info.  Most mid-range and upper-range cameras have it too.

That information is used for example by Google Maps to present photos taken at a specific location.

6 0
3 years ago
Write a function check_palindrome that takes a string as an input and within that function determines whether the input string i
Setler79 [48]

Answer:

The function in Python is as follows:

def check_palindrome(strn):

   retstr = "Bummer. Not a palindrome."

   if strn[len(strn)::-1] ==strn:

       retstr = "Hey! That's a palindrome!"

       

   return retstr

Explanation:

This defines the function

def check_palindrome(strn):

This sets the return string to not a palindrome

   retstr = "Bummer. Not a palindrome."

This checks if the original string and the reversed string are the same

   if strn[len(strn)::-1] ==strn:

If yes, the return string is set to palindrome

       retstr = "Hey! That's a palindrome!"

This returns the expected string

   return retstr

<em>The function to reverse the string is not given; and the programming language. So, I solve the question without considering any function</em>

3 0
3 years ago
If you tap or click the increase font size button too many times and make the font size too big, you can tap or click the _____
ioda
You can click the ctrl and minus  button at the same time
7 0
4 years ago
2.7 code practice question 1 edhesive
Virty [35]

I will edit this if you edit your question..

Im confused. This is not a question..

8 0
3 years ago
Read 2 more answers
The two types of objects responsible for collecting data are
andrezito [222]
Hey there,
The answer is <span>tables and forms

Hope this helps :))

~Top
</span>
7 0
3 years ago
Other questions:
  • Given that arrayIntValues [MAX_ROWS][MAX_COLUMNS] is a 2 dimensional array of positive integers, write a C++ function Even to fi
    15·1 answer
  • Fundamental types of data, such as strings, integers, and real numbers, are known as
    5·1 answer
  • What can be done to improve the security of business uses of the Internet? Give several examples of ecurity measures and technol
    9·1 answer
  • Cuales Son las características de la máquina analítica de Carlos Babbage ?
    11·1 answer
  • You are the CISO of a company and you need to create logging policies. Please review NIST SP800-92, specifically sections 4–3 th
    12·1 answer
  • Using hard disk to temporarily store data or instructions from ram is referred to as the
    12·1 answer
  • Is a pocket watch consider a computer
    15·1 answer
  • Which of the following statements holds true for the term plug-in? Group of answer choices It refers to a program (typically a m
    11·1 answer
  • WHAT ARE SOME PROS AND CONS OF HYDROGEN FUELL CELLS
    11·1 answer
  • Array bounds checking should be directly coded into a system rather than assumed.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!