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

Write a statement that reads 5 successive integers into these variables that have already been declared: x1, x2, x3, x4, x5. The

n write a statement that prints each out on its own line so that they form a right-justified column with a 5-digit width. If any of the integers are 5-digits in size, then they will start at the very beginning of their lines. For example:
Computers and Technology
1 answer:
prisoha [69]3 years ago
5 0

Answer:

Following are the statement in C++ language :

#include <iomanip> // header file  

using namespace std; // namespace

int main() // main method  

{

   int x1,x2,x3,x4,x5; // variable declaration

cout<<" Enter the 5 sucessive integer:";

cin>>x1>>x2>>x3>>x4>> x5; // taking 5 input from user

cout<<right;

// prints each  of  its own line and form a right-justified  

cout<<setw(5)<< x1 << "\n" << setw(5) << x2 << "\n" <<setw(5) << x3 << "\n" << setw(5) << x4 << "\n" << setw(5) << x5 << "\n";

return(0);    

}

Output:

Enter the 5 sucessive integer: 45

23

445

6

8

 

  45

  23

 445

   6

   8

Explanation:

Description of program is given below  

  • Declared a 5 integer value x1,x2,x3,x4,x5 respectively.
  • Read the 5 integer value from user by using cin funtion.
  • Finally Print these 5 value in its own line and form a right-justified by using setw() function on it
You might be interested in
The function below takes a string argument sentence. Complete the function to return the second word of the sentence. You can as
enyata [817]

Answer:

Following are the code to this question:

def string_argument(val): #Defining a method string_argument

   w= val.split() #Define variable that split value

   if len(w) < 2: # Define condition to check value length  

       return None #return value

   if w[1][-1] in ",;.!?": #Define condition to check special character  

       return w[1][:-1] #return second word

       return w[1] # return value

print(string_argument("good morning hello?")) #call method and print return value

print(string_argument("hii morning, DEV"))#call method and print return value

print(string_argument("how are you? MR"))#call method and print return value

print(string_argument("dev lambda. Who"))#call method and print return value

print(string_argument("thanks")) #call method and print return value

Output:

None

morning

None

lambda

None

Explanation:

In the given python program, a method "string_argument" is declared, that accepts a value val in its parameter, inside the method, another variable "w" is used, that splits the argument value. In the next line, two if conditional block is used which can be described as follows:

  • In the first block, it will check the length, it is not less then 2, if this condition is true it will return none.
  • In the second if the block it will check, that variable val holds any special character in its second word so, it will return the second word.
3 0
2 years ago
Which of the following rules need to be followed when using variables?<br> Choose all that apply.
Masja [62]

Answer:

- All variable names must begin with a letter of the alphabet or an. underscore( _ ).

-After the first initial letter, variable names can also contain letters and numbers.

-Uppercase characters are distinct from lowercase characters.

-You cannot use a C++ keyword as a variable name.

7 0
2 years ago
Read 2 more answers
Website managers use____ every day.
babymother [125]

Answer:

technology

Explanation:

4 0
3 years ago
Read 2 more answers
With _______, applications are owned, delivered and managed remotely by one or more providers over the Internet or an intranet,
vfiekz [6]

Answer:

EMAIL

Explanation:

3 0
3 years ago
How do new sources of power assist in the development of inventions?
pentagon [3]
<span>New sources of power assist in the development of inventions since t</span>he new inventions would have been worthless without a reliable source of power energy.
3 0
3 years ago
Other questions:
  • Using the bitwise AND operation, the result of 1 AND 0 is ___________. 10100100 ___________ 11010101 = 01110001. A common way to
    15·1 answer
  • What is a step by step procedure written to carry out a task?
    11·1 answer
  • Which security control is most helpful in protecting against eavesdropping on wireless LAN (WLAN) data transmissions that would
    6·1 answer
  • What component of Kerberos is responsible for storing keys for encrypting and decrypting data in the authentication process?
    13·1 answer
  • Which type of computing device is best suited to having a digital pen as an input device?
    9·1 answer
  • What decides the amount of delay between shots on a digital camera?
    7·1 answer
  • Describa la clasificación de los recursos educativos digitales abiertos. vea este video, para hacer eso
    11·2 answers
  • Giusp minfg gấp vs ạ đáp án thôi nhé
    15·1 answer
  • I WILL MARK BRAINIEST FOR THIS!!!!!!
    11·2 answers
  • Darla is going to start writing the HTML code for a web page. What would she start with?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!