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 lighting direction is used to create silhouettes
Elena L [17]
The answer is backlighting
5 0
3 years ago
Even though Wordpress is basically free, what is the company trying to accomplish?
Verdich [7]

Answer:

The purpose of wordpress is to develop blogs or dynamic websites.

5 0
3 years ago
There are three required elements needed to connect to the internet: hardware, web browser, and __________.
malfutka [58]

Yes the answer is D.internet service.

7 0
3 years ago
Read 2 more answers
The service known as ___ contains original content in the form of live or recorded streams showing individuals playing video gam
liraira [26]

<u>Twitch</u> is an online service that comprises original content in the form of live or recorded streams and it is typically focused on showing various individuals that are playing video games.

Twitch is an online (web) service that was launched in June 2011 and it derived its name from twitch gaming such as video games that are mainly about fast action and the use of reflexes by the game players.

The main purpose of Twitch is to avail game players the opportunity to stream or show live or recorded videos of themselves playing video games.

Read more: brainly.com/question/21694571

6 0
2 years ago
Application software
Crazy boy [7]

Answer:

it would be B hope this helps

Explanation:

8 0
3 years ago
Other questions:
  • onsider the following program: Peform a total of six exercises. Select one exercise from each of the following areas: hips and l
    6·1 answer
  • A security administrator is required to submit a new csr to a ca. what is the first step?
    11·1 answer
  • What is code reuse meant to do?
    9·1 answer
  • You disassemble and reassemble a desktop computer. when you first turn it on, you see no lights and hear no sounds. nothing appe
    11·2 answers
  • 4.2: Roman Numeral Converter
    9·1 answer
  • Sierra owns a small business and handles many responsibilities, from logistics to marketing. She's seen a lot of success with Go
    11·1 answer
  • The national highway system improved economic activity in Georgia by
    6·2 answers
  • Any action that causes harm to your computer is called a
    15·1 answer
  • Blank Are input instructions you give to a computer
    13·1 answer
  • If each integer occupies one 64-bit memory cell and is stored using sign/magnitude notation, what are the largest (in terms of a
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!