Question

In: Computer Science

11. For each of the following problems, click after Statement, press enter and type a statement...

11. For each of the following problems, click after Statement, press enter and type a statement to accept input data from the keyboard into meaningful variable names of your choice. Your statement includes prompts and conversion functions as needed. a. Accepts your gpa (a real number). Statement: b. Accepts the number of people in your family (an integer number). Statement:

Solutions

Expert Solution

In this question because programming language is not specify, so that i am writing given statement in C and C++ programming language:

______________________________________________________________________________________

Statement 1: Accept your gpa:

Because in given statement gpa is a real number, so here i am declaring this variable as a float dat atype.

In C Language:

Statement:

float gpa;//variable declaration of float type

printf("Enter your gpa====");// This statement display a message to the user at the run time 

scanf("%f",&gpa);// value enter by user is stored in this variable.

printf("GPA value entered by you====%f",gpa);//Display a message on the screen

In C++ Language:

​​​​​​​Statement:

float gpa; //variable declaration of float type
cout<<"Enter your gpa";//This statement display a message to the user at the run time 
cin>>gpa;//value enter by user is stored in this variable.
cout<<"GPA value entered by you===";//Display a message on the screen

________________________________________________________________________________________________________

Statement 2:Accepts the number of people in your family (an integer number):

In C Language:

Statement:

int NoOfFamilyMember; // variable declaration of integer type

printf("Enter total numbers of members in your family"); //on a output screen display a message to the user

scanf("%d",&NoOfFamilyMember); //store the value input by user in the variable

printf("Totla number of family members entered by you===%d",NoOfFamilyMember);

In C++ Language:

Statement:

int NoOfFamilyMember; // variable declaration of integer type

cout<<"Enter total numbers of members in your family"; //on a output screen display a message to the user

cin>>NoOfFamilyMember//store the value input by user in the variable

 cout<<"Totla number of family members entered by you===";

Related Solutions

“1. What determines blood type? “ Click here to enter text. “2. What type of blood...
“1. What determines blood type? “ Click here to enter text. “2. What type of blood antigens are expressed if a person is blood type AB negative? “ Click here to enter text. “3. Why doesn’t a transfusion reaction occur the first time an Rh negative patient is exposed to Rh positive blood? “ Click here to enter text. What surprised you about the anatomy of the sheep’s heart? Click here to enter text. Research diseases of the heart valves....
At the command prompt, enter the following command and press enter. tasklist This command displays the...
At the command prompt, enter the following command and press enter. tasklist This command displays the currently running tasks (programs). You will see one specific program that appears over and over again in the list of running programs. This program is actually a wrapper program that runs computer instructions found in .DLL files. Based on the output of the command, which of the following programs is the wrapper program? A. lsass.exe B. winlogon.exe C. svchost.exe D. cmd.exe
Windows 10 Inside Out: In the Search box on the Taskbar, type WordPad and press “Enter”....
Windows 10 Inside Out: In the Search box on the Taskbar, type WordPad and press “Enter”. Type some text into WordPad. A) What keyboard shortcuts would you use to select all of this text and copy it to the Clipboard? (See Table 3-2 on page 103.) B) Go the end of the text in WordPad. What keyboard shortcut would you use to paste what you copied into WordPad? C) What keyboard shortcut would you use to Undo what you just...
Use Linux fedora At the command prompt, type route and press Enter. What entries are listed?...
Use Linux fedora At the command prompt, type route and press Enter. What entries are listed? What does each entry represent? What IPv4 address is listed as your default gateway? At the command prompt, type ip route add 1.0.0.0/8 via gwIP and press Enter, where gwIP is the IPv4 address of your default gateway. At the command prompt, type route and press Enter. Is the route added in Step 3 visi- ble? Will this route interfere with traffic that is...
Free-response Problems Each answer in the following problems isworth 4 points. 11. A glass beaker...
Free-response Problems Each answer in the following problems is worth 4 points. 11. A glass beaker contains a transparent colorless liquid (of unknown refractive index). A light ray is incident on the liquid at an angle of 30.0°, as shown. The light ray travels through the liquid, and hits the side of the beaker at the critical angle. (The refractive index of the glass is 1.60). Find: (a) The refractive index of the unknown liquid (b) The angle 02. 30.00
Table 2: Experiment 1 Image Observations Image Type Image Observations Thyroid Gland Click here to enter...
Table 2: Experiment 1 Image Observations Image Type Image Observations Thyroid Gland Click here to enter text. Parathyroid Gland Click here to enter text. Pancreas Click here to enter text. Adrenal Gland Click here to enter text. Pituitary Gland Click here to enter text. Anterior Pituitary Gland Click here to enter text.
Troubleshooting Exchange Server 2013 Type Test-ServiceHealth and press <Enter> What does this command do? When would...
Troubleshooting Exchange Server 2013 Type Test-ServiceHealth and press <Enter> What does this command do? When would you use it? Why is it helpful? Type Test-MapiConnectivity and press <Enter> What does this show? Type Test-MapiConnectivity Mjackson and press <Enter> What does this show? What is the difference between the commands in step 2 and 3? Type Get-MailboxStatistics Mjackson | Format-List DisplayName, IsQuarantined What does this command tell us? When would you run this command?        5 . What is a concern...
Why won't the program run the code after the first switch statement. It shows Press c...
Why won't the program run the code after the first switch statement. It shows Press c to continue or q to quit, but does not give the user the option to fill it in. Please help to run the code fully. This program is to find the area of shapes the user decides and must give them an option to quit or restart the program. Please provide the explanation and code in JAVA here. Thank you. import java.util.Scanner; import java.lang.Math;...
consider execution of the following switch statement: int Enter = 10; cin >> Enter; switch (Enter)...
consider execution of the following switch statement: int Enter = 10; cin >> Enter; switch (Enter) { case 1: Enter = -4; case 2: Enter = -6; case 4: break; case 6: Enter = -8; break; default: Enter = -1; } What would the value of Enter be after execution of this code if the value read for Enter were 4? -4,-6,-8 or none
For each of the problems below, list the type of test that is appropriate and describe...
For each of the problems below, list the type of test that is appropriate and describe why it is appropriate. (4 points each) Clearly label each answer! a. A researcher thinks that smoking cigarettes causes headaches. He measures whether 50 smokers have headaches prior to smoking cigarettes. He then has all the subjects smoke 2 cigarettes then measures the degree to which 50 smokers have headaches. b. A researcher wants to know if people with larger heads are smarter. He...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT