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
podryga [215]
4 years ago
12

Write a function, reverse Digit, that takes an integer as a parameter and returns the number with its digits reversed. For examp

le, the value of reverse Digit( 12345) is 54321; the value of reverseDigit (5600) is 65; the value of reverseDigit (7008) is 8007; and the value of reverseDigit (-532) is -235.
Business
1 answer:
satela [25.4K]4 years ago
3 0

Answer:

This is how you'll write the code in C++ programming language.

Explanation:

using namespace std;

//begin task

int reverseDigit(int val)

{

int res = 0;

while (val != 0)

{

//move digits result to left

res *= 10;

//get last digit value

res += val % 10;

//next digit value

val = val / 10;

}

return res;

}

//end task

//TESING

int main()

{

cout << reverseDigit(12345) << "\n";

cout << reverseDigit(5600) << "\n";

cout << reverseDigit(7008) << "\n";

cout << reverseDigit(-532) << "\n";

return 0;

}

You might be interested in
According to this credit report, how many accounts has Lillie had sent to collections?
Natali [406]

Answer:From the credit report the number of accounts that Lille has sent collections is 0. This is because she has sent not sent any to an account. What is a credit report? This is a report of how a persons credit activity is. It also tells about the financial standing of a person and how they are faring in terms of finance.

Explanation:

4 0
2 years ago
An online retailer uses complex data-mining software to evaluate the preferences and buying habits of its customers and makes de
rusak2 [61]

Answer: Analytics

Explanation:

The online retailer is applying analytics to evaluate buyers preferences and habits: this information gotten influences the decisions made by the retailer.

Analytics in decision making process occurs when a manager in an organization carefully analyses systematic statistical data to make decisions in the organization.

The use of analytics in decision making helps reduce errors and enables the manager make accurate decisions.

3 0
3 years ago
If OPEC decided to cut oil production for the coming year, what would be the MOST LIKELY effect?
LekaFEV [45]

Answer:

Maybe a loss in jobs?

Explanation: Because people who work for the oil company have to stop working idk

3 0
3 years ago
Read 2 more answers
After you record your business transactions, what’s the next step in the process of turning this data into useful information
sesenic [268]

Answer:

after yopu record the transaction using the double entry sysem, then you must identify the category which these balances belong to such as Assets, expenses, Liabilities, Income or Equity.

It is only after this identification we can apply these to calculate the overal financial productivity of the organization or the profit. because then we can identify the effect these balances have upon the profit!

Explanation:

6 0
3 years ago
Travel by bus and pawn-shop services would be expected to be examples of
drek231 [11]
An example of inferior goods
4 0
3 years ago
Read 2 more answers
Other questions:
  • A ____ is a value that the user enters whenever a query is run, which provides flexibility, enables users to access information
    8·1 answer
  • 73) A company releases a five-year bond with a face value of $1000 and coupons paid semiannually. If market interest rates imply
    9·1 answer
  • Which type of employee is most likely to report ethical issues in the workplace? rank and file. middle managers. executives. tem
    6·1 answer
  • What is the typical relationship between time and interest rate
    11·2 answers
  • Meric Mining Inc. recently reported $15,000 of sales, $7,500 of operating costs other than depreciation, and $1,200 of depreciat
    10·1 answer
  • P4-5 Sales and purchase-related transactions for seller and buyer The following selected transactions were completed during June
    12·1 answer
  • In the ________ stage of the industry life cycle, the emphasis on product design is very high, the intensity of competition is l
    15·1 answer
  • __________ involves defining the firm's marketing mix variables so that target customers have a clear, distinctive, and desirabl
    7·1 answer
  • (a) how much fiscal restraint occurred between 1931 and 1933? $ billion (b) by how much did this policy reduce aggregate demand
    12·2 answers
  • Given that inflation in the U.S. is projected at 2% annually for the next 5 years and at 8% annually in India for the same time
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!