Concept explainers
In Exercises 1 through 52, determine the output produced by the lines of code.
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Introduction To Programming Using Visual Basic (11th Edition)
- Write a program that requests a three-part name and then displays the middle name. See Fig. 2.33. Fig. 2.33 Enter a 3-part name: Michael Andrew Fox Middle name: Andrewarrow_forwardMany documents use a specific format for a person's name. Write a program whose input is: firstName middleName lastName and whose output is: lastName, firstInitial.middleInitial. Ex: If the input is: Pat Silly Doe the output is: Doe, P.S. If the input has the form: firstName lastName the output is: lastName, firstInitial. Ex: If the input is: Julia Clarkarrow_forwardConvert Months Write a program that allows the user to enter a whole number of monthsand then converts that amount of time to years and months. See Fig. 3.38. The programshould use both integer division and the Mod operator.arrow_forward
- C++ program If moderately active persons cut their calorie intake by 500 calories aday, they can typically lose about 4 pounds a month. Write aprogram that has the users enter their starting weight and thencreates and displays a table showing what their expected weight willbe at the end of each month for the next 6 months if they stay on thisdiet.arrow_forward25. Repeat Programming Exercise 24, but the wire is to be bent in the form of a circle. In this case, the user specifies the length of the wire and the program outputs the radius and area of the circle. (You may assume that . Also declare it as a named constant.)arrow_forwardMany documents use a specific format for a person's name. Write a program whose input is: firstName middleName lastName and whose output is: lastName, firstInitial.middleInitial. Ex: If the input is: Pat Silly Doe the output is: Doe, P.S. If the input has the form: firstName lastName the output is: lastName, firstInitial. Ex: If the input is: Julia Clark the output is: Clark, J.arrow_forward
- EXERCISE WEEK 7 (USE C++ CODING) Based on the image attached, shows a statement of a program are in the incorrect order. Rearrange the statements so that they prompt the user to input the shape type (rectangle, circle, or cylinder) and the appropriate dimension of the shape. The program then outputs the following information about the shape: For a rectangle, it outputs the area and perimeter; for a circle, it outputs the area and circumference; and for a cylinder, it outputs the volume and surface area. After rearranging the statements, your program should be properly indented.arrow_forwardTranscribed Image Text Father's age is stored in variable f_age, and his two childrens' ages are stored in variables clage and c2age. Which if statement checks if father's age is greater than the sum of ages of his childrens? Lütfen birini seçin: O a. if (f_age >clage * c2age) O b. if (f_age >= clage + c2age) O c. if (f_age >clage + c2age + c3age) O d. if (f_age !<clage + c2age) O e. if (f_age >clage + c2age)arrow_forwardExercise 1: Ask the user to type a string. Count and display the number of vowels (a,e,i,o,u). Print the string with all the vowels removed. Exercise 2: Cows cost $10 each, sheep cost $1 each and 8 hens can be bought for $1. Write a program which will buy exactly 100 animals for exactly $100 containing all three types (not just 100 sheep!)arrow_forward
- (Use Dev C++) Write a program to display the leap years in the years 2000 to 2099. A leap year is a year that is divisible by 4, but if it is divisible by 100, it should also be divisible by 400.arrow_forwardCreate IPO chart for the below program, write the algorithm using pseudo code #include<iostream>int main(){using namespace std;int number =0;cout<<"University of Okara"<<endl;cout<<"Enter the number of registrants :"<<endl;cin>>number;if(number <=0){cout<<"Error."<<endl;}else if(number<=7){cout<<"Total Amount is Rs:"<<number*100<<endl;}else if(number>8 && number<=14){cout<<"Total Amount Owed is Rs:"<<number*75<<endl;}else{cout<<"Total Amount Owed is Rs:"<<number*50<<endl;} return 0;}arrow_forwardGrowth of an Investment Suppose a fixed amount of money is deposited at the beginning of each month into an investment paying 6% interest compounded monthly. After each deposit is made, [new balance]=1.005∗[previous balance one month ago]+ [fixed amount]. Write a program that requests the fixed amount of the deposits as input and displays the balance after each of the first four deposits. See Fig. 5.14.arrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning