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
never [62]
3 years ago
15

Write a C++ program to store 10 student names and grade point averages (GPAs) from the user. Display all student information in

a tabular format. Ensure that each column heading aligns correctly with its respective column and that each name (first and last) is capitalized. Finally, display each GPA with two significant decimals
Computers and Technology
1 answer:
Aleksandr-060686 [28]3 years ago
6 0

Answer:

Answer to this question is given below in the explanation section.

Explanation:

 

#include <iostream>

#include<iomanip>

#include <string>

#include <cctype>

using namespace std;

int main()

{

   string firstName[10], lastName[10];//variable declaration

   double gpa[10];

   for(int i=0; i<10;i++)//loop for entering 10 students record

   {  

       cout<<"Enter data for student: "<<i+1;//start from 1

       cout<<"\nEnter First Name: ";

       cin>>firstName[i];

       cout<<"Enter Last Name: ";

       cin>>lastName[i];

       cout<<"Enter the GPA: ";

       cin>>gpa[i];

   }

  cout<<"\n*********************************************************************";

  cout<<"\n"<<setw(30)<<"Student Data";//setw set the space to 30

  cout<<"\n*********************************************************************";

  cout<<"\n";

  cout<<setw(10)<<"First Name"<<setw(25)<<"Last Name"<<setw(25)<<"GPA";//display column header

  for(int i=0; i<10; i++)//display student entered record

  {

      cout<<"\n"<<setw(10)<<firstName[i]<<setw(25)<<lastName[i]<<setw(25)<< setprecision(3)<<gpa[i];//setprecision function set the decimal limit to 2

  }

  cout<<"\n*********************************************************************";

  cout<<"\n"<<setw(30)<<"Finished";

  cout<<"\n*********************************************************************";

   

   

   return 0;

}

                                                                                                                                                                                                                                                             

You might be interested in
In what decade was photography invented? the 1800s the 1820s the 1840s the 1860s
frutty [35]

Answer:

In the year 1820's

It is B

4 0
3 years ago
Every information systems (is) user has the right to a secure computing environment. this means that the
Arturiano [62]
<span>Every information systems (IS) user has the right to a secure computing environment. this means that the </span>organization should protect his/her computer and its files.
5 0
4 years ago
Which is a benefit of owning a desktop computer instead of a laptop?
Setler79 [48]
B) a desktop is less likely to be stolen or damaged
4 0
4 years ago
Read 2 more answers
Suppose you are an ISP that owns a / 22 IPv4 address block. Can you accommodate requests from six customers who need addresses f
lisabon 2012 [21]

Answer:

It is not possible.

Explanation:

In this example, we need to accommodate 473 computers for six clients that are 473 IP addresses.

For this request just we have /22 IPv4 address blocks, this mean

22 red bits 11111111111111111111110000000000 <--- 10 host bits

We must increase red bits to 25, we need these 3 bits to create 6 sub red, in this case, 2^3 = 8 sub red.

Why did we ask 3 bits? Because if we ask only 2, 2^2 = 4, and we need 6 sub red.

25 red bits 11111111111111111111111110000000 7 host bits

In this case, we need more than 260 computers, but just we have 7 bits, this means.

2^7 = 128 and just one customer needs 260, for that is impossible.

7 0
3 years ago
Question 16 of 40
neonofarm [45]

Answer:

D hjjhhhhhhhhhhhhhhh

Explanation:

cuz

6 0
4 years ago
Read 2 more answers
Other questions:
  • Which of the following characteristics relates to authentication header (AH)? It is a document that defines or describes compute
    11·1 answer
  • The identification of critical information is a key part of the OPSEC process because: a) It is required by the JTF commander to
    13·1 answer
  • Which of the following is NOT true about RMI? RMI uses the socket connection, including opening and closing the socket. RMI allo
    8·1 answer
  • Suppose the file is sent continuously as one big message. how long does it take to send the file, assuming it is sent continuous
    15·1 answer
  • CodeHS 3.4.5. What is the code for four colored triangles.
    8·1 answer
  • Write a program name Dollars that calculates and displays the conversion of an entered number of dollars into currency denominat
    11·1 answer
  • Which of the following is a good precaution to take when making online purchases? (1 point)
    15·1 answer
  • What can provides access to the only menu in office 2007​
    13·1 answer
  • What software application is most appropriate to use to create multimedia presentations?
    6·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!