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
postnew [5]
3 years ago
11

Read an integer from keyboard and then print the result of the sum obtained by adding the entered integer to the integer formed

by reversing the order of the digits. (For example: entered number = 123. Sum = 123+321 = 444)
Computers and Technology
1 answer:
Stels [109]3 years ago
3 0

Answer:

Following are the program in C++ language

#include <iostream> // header file

using namespace std; //  namespace std;

int main() // main function

{

int number,n1,rem; // variable declaration

int sum,sum1=0;// variable declaration

cout<<"Enter the number :";

cin>>number;// Read the number

n1=number; // initialized the value of number with the n1

while(n1>0) // iteating the  while loop

{

   rem=n1%10; // finding the reminder

   sum1=10*sum1+rem;  // storing the sum

   n1=n1/10;

}

sum=sum1+number; // calculate the sum

cout<<"The sum is:"<<sum; // Display sum

   return 0;

}

Output:

Enter the number :123

The sum is:444

Explanation:

Following are the Description of the Program

  • Read the value of "number" in the "number" variable of int type .
  • Initialized the value of "number" in the "n1' variable.
  • Iterating the while loop until the n1>0.
  • In this loop we reverse the number in the "sum1" variable
  • Finally print the sum in the "sum" variable

You might be interested in
Which statement best explains taxation without representation was a major issue for colonists?
Sauron [17]
Taxation without representation was a major issue for the colonists, because they were being unfairly taxed by the British without having a representative in the British Parliament to represent them ans state that they were against this. It was also one of the driving forces of the American Revolution, as it was just one of the grievances the colonists were experiencing from the British. 
4 0
3 years ago
Identify the correct sequence of steps to change the font from Verdana to Arial.
kotegsom [21]
Click the font button in the top left hand corner, and search fkr verdana.
3 0
3 years ago
A website wants to gives out detailed information to viewers about its upcoming conference and also provides a feature for searc
Alenkinab [10]

Answer: WIREFRAME

A website wireframe, also known as a page schematic or screen blueprint, is a visual guide that represents the skeletal framework of a website.[1]:166 Wireframes are created for the purpose of arranging elements to best accomplish a particular purpose. The purpose is usually being informed by a business objective and a creative idea. The wireframe depicts the page layout or arrangement of the website's content, including interface elements and navigational systems, and how they work together.[2]:131 The wireframe usually lacks typographic style, color, or graphics, since the main focus lies in functionality, behavior, and priority of content.[1]:167 In other words, it focuses on what a screen does, not what it looks like.[1]:168 Wireframes can be pencil drawings or sketches on a whiteboard, or they can be produced by means of a broad array of free or commercial software applications. Wireframes are generally created by business analysts, user experience designers, developers, visual designers, and by those with expertise in interaction design, information architecture and user research.

3 0
3 years ago
Ted has $55.00 in his pocket. Which purchase will he be able to pay for with cash?
Alex73 [517]
You just need a little bit of math to solve this. Add up the items and see which one would be equal to $55.00 or less. 

A = $59.90 so this is not the answer
B = $60.94 so this is not the answer
C = $55.99 so this is not the answer

D = $50.97 

D is the correct answer.
3 0
2 years ago
Read 2 more answers
Which toolbar is located next to the office button and contain the commonly used commands​
Andrei [34K]

Answer: Quick Access Toolbar

The Quick Access Toolbar is located to the right of the Microsoft Office Button . It contains commands that are used most often, for example Redo, Undo and Save.

Explanation:

7 0
3 years ago
Other questions:
  • Software license infringement is also often called software __________.
    11·2 answers
  • What are the advantage of transistors over vacuum tubes?
    6·1 answer
  • Which one of these do not belong on the Do's list in Helpful Hints when preparing a presentation: Which one of these do not belo
    8·1 answer
  • Enter a word: Good<br> Enter a word: morning<br> Good morning
    8·2 answers
  • which of the following memory types cannot store the data for information permanently Ram chachi Flash Memory hard disk​
    8·1 answer
  • Which type of fiber-optic connector, containing one fiber-optic strand per connector, is connected by pushing the connector into
    7·1 answer
  • 3. State whether the given statements are true or false. a. The computer is called a data processor because it can store, proces
    13·1 answer
  • Explain why the program did not print "clap", and how to fix it.
    13·1 answer
  • How are 1gls different from 2gls​
    10·1 answer
  • Which of the following offers a combination of the features of ram and rom?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!