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
I Promise Brainliest !!!!! Describe how the aperture size relates to the size of the lens opening.
sergey [27]

Answer:

As aperture increases in f-stop values, the lens closes. On the other hand, when aperture decreases in f-stop values, the lens opens.

Explanation:<u><em>plz give brainlist</em></u>

8 0
3 years ago
Read 2 more answers
In what country did true printing first take place?
kow [346]
Germany. Johannes Guten in Mainz, Germany
7 0
3 years ago
Read 2 more answers
The possibility of devices outliving a manufacturer, leaving them without long-term support against vulnerabilities is a possibl
Dafna11 [192]

Answer: Security (updating of software and hardware)

Explanation:

Internet of Things is one of the latest inventions in technology wherein smart objects and devices can connect to the internet and also share information within that space.

One of the several challenges of the Internet of Things is Security. Because of the introduction of the Internet, there is a vulnerability to hacking. Upgrades, therefore ought to be regularly provided so as to prevent hackers from recognizing patterns and hacking into them. So when the device outlives the manufacturer, there would be no one to provide regular updates thus making the device vulnerable.

8 0
4 years ago
Choose the two (2) statements that are true about functions​
Natalka [10]

Answer:

In the given question statements are missing. So, we assume two true statements. Which can be given as :

  • Function name should be meaning full  
  • Programming features are called programming instruction groupings.

Explanation:

In the programming language, a function is a group of organized code that is used to increases the reusability of the program. In the declaration of the function we should remember two points which is can be described as:

  • function name should be meaning full means is that if we want to print some data in function. So, we write a function name that is matched to its data like message, information, data, etc. these names help another programmer to understand more easily.  
  • In the function, Programming features are called programming instruction groupings.

That's are the statements for function that is described above.

4 0
3 years ago
Given a int variable named yesCount and another int variable named noCount and a char variable named response, write the necessa
MariettaO [177]

// reading the value in response variable

cout<<"Enter the value :";

cin>>response;

// checking the value and printing the results

if(response == 'y' || response == 'Y')

{

yesCount+=1;

cout<<"YES WAS RECORDED";

}else if(response == 'n' || response == 'N')

{

noCount+=1;

cout<<"NO WAS RECORDED";

}else

cout<<INVALID";

5 0
3 years ago
Other questions:
  • one business rule is that each project has one manager. Identify two (and no more than two) problems with the data structure or
    9·1 answer
  • What is a key reason for assignning permissiongs when configuring file and share access?
    7·1 answer
  • What does a column represent in a chart?
    13·1 answer
  • A(n) ____ is a location on your computer screen where you type text entries to communicate with the computer’s operating system.
    9·2 answers
  • Which of the following is something all models use to determine relationships?
    7·1 answer
  • The birthday problem is as follows: given a group of n people in a room, what is the probability that two or more of them have t
    12·1 answer
  • Desirable workplace habits and skills include:
    14·1 answer
  • Which of the following is not true?A. An organization may express its cybersecurity state through a Current Profile to report re
    10·1 answer
  • Elliott is trying to normalize a database that he has designed. Which is not one of the elements of 1NF or 2NF?
    15·1 answer
  • The electors in each state shall have the qualifications requisite for electors of the most numerous branch of the state legisla
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!