Fill in blanks in each of the following:
a) _____are used to document a
b) The object used to print information on the screen is________.
c) A C++ statement that makes a decision is_______.
d) Most calculations arc normally performed by__________statements.
e) The________object inputs values from the keyboard.
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
C++ How To Program (Early Objects Version), Global Edition, With Access Card, 10 Ed
Additional Engineering Textbook Solutions
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Software Engineering (10th Edition)
Artificial Intelligence: A Modern Approach
Web Development and Design Foundations with HTML5 (8th Edition)
Starting Out with C++ from Control Structures to Objects (9th Edition)
Starting Out With Visual Basic (8th Edition)
- The impact of COVID-19 on the citizenry has not been good especially when it comes to buying of food and the payment for the provision of essential services such as light and water bills. After lockdown, the government decided to support customers by halving the customer’s light bills. a) Write a program to request for customer’s name, previous and current meter reading (in kwh) b) Your program should categorize customers into domestic, commercial and industrial based on the quantity of electricity consumed. The categorization should follow: 1. Domestic if less than or equal to 100 kwh is consumed;2. Industrial if more than 100kwh but less than or equal to 200kwhis consumed;3. Commercial when more than 200kwh is consumed c) Define a method to compute the amount to be paid based on the following consumption pattern, for:1. Domestic customers, 0.3 GHC per kwh for the first 60kwh and 0.5 GHC for the rest2. Industrial customers, 0.5 GHC per kwh for the first 120kwh and 0.75 GHC for the…arrow_forwardCOMPUTER PROGRAMMING AND APPLICATIONS PROJECT REQUIREMENTS pls write program C++ , you must fulfil the following requirements: • Appropriate comments (write explanations for important statements) • Appropriate indentations (to make your program readable) • Appropriate variables’ declarations • Input / Output (cin, cout) • Calculation (involve at least three calculations) • I/O Manipulators (e.g.: setw() or setfill() or setprecision() or etc.) • Pre-defined Functions (e.g.: getline(), or gcount(), or ignore() or pow(x,y), or etc.) • User-defined Functions (call by value or call by reference) • Control Structure (e.g.: if-else, nested if) • Loops (e.g.: for, while, do..while, nested loops) • Arrayarrow_forward4. During each summer, John and Jessica grow vegetables in their backyard and buy seeds and fertilizer from a local nursery. The nursery carries different types of vegetable fertilizers in various bag sizes. When buying a particular fertilizer, they want to know the price of the fertilizer per pound and the cost of fertilizing per square foot. The following program prompts the user to enter the size of the fertilizer bag, in pounds, the cost of the bag, and the area, in square feet, that can be covered by the bag. The program should output the desired result. However, the program contains logic errors. Find and correct the logic errors so that the program works properly. // Logic errors. #include #include using namespace std; int main() { double costs double area; double bagsize; cout > bagsize; cout > cost; cout > area; cout << endl; cout << "The cost of the fertilizer per pound is: $" << bagsize / cost << endl; cout << "The cost of fertilizing per square foot is: $" << area / cost << endl; return 0; }arrow_forward
- Suppose x and y are int variables and symbol is a char variable. Assume the following input data: 38 26 * 67 33 24 $ 55 # 34What value (if any) is assigned to x, y, and symbol after each of the following statements executes? (Use the same input for each statement.) (2, 3, 4) Submit your answer to dropbox. must be in C++ language and I have attached the parts thank youarrow_forwardPython variables do not need explicit declaration to reserve memory space. Based on this statement, address the following in your initial post: Describe the difference between explicit typed variables and implicit typed variables using examples. In large scale applications, explain whether or not explicit declaration has a better impact over implicit declaration.arrow_forwardIdentify and correct which statement (s) in the following C++ programs will cause a compiler error? In your answer, you have to write and correct only the statement that has the syntax error. #include <iostream> using namespace std; int main( ) { int netIncome; double taxBill; double fivePercentTax, tenPercentTax; cout >> "Enter net income (rounded to whole dollars) $"; cin >> netIncome; if (netIncome <= 15000 taxBill = 0; else taxBill = (0.05**(netIncome - 15000)); cout << "Net income = $" << netIncome << endl cout << "Tax bill = $" << taxBill << endl; retrn 0; }arrow_forward
- Hi, please help me complete this code in Program C. int getNum(); void display(int n); -------------------------------------------------------------- Write a program that will receive a user input of any POSITIVE integer. The program will then output the first N even numbers, starting from 0. Implements the following functions: int getNum(); /*accepts input from the user.*/ void display(int n); /*prints the first n even numbers starting from 0.*/ Note: Use only do while loop. You are not allowed to edit main.c and positive.h. Create another file for the implementation. Input A single line containing a positive integer. 5 Output Even numbers from 0 up to the nth even number, all seperated by a new line. 0 2 4 6 8arrow_forwardin C For each of the following, write a single statement that performs the indicated task. Assume that long integer variables value1 and value2 have been defined and that value1 has been initialized to 200000. a) Define the variable lPtr to be a pointer to an object of type long. b) Assign the address of variable value1 to pointer variable lPtr. c) Print the value of the object pointed to by lPtr. d) Assign the value of the object pointed to by lPtr to variable value2. e) Print the value of value2. f) Print the address of value1. g) Print the address stored in lPtr. Is the value printed the same as the address of value1?arrow_forwardConsider the following C++ code snippet and choose the best statement below. char slogan = "Go Giants"; A) This code will compile, but you could have a run time error because no array was allocated to store the characters B) This code will compile and has no apparent problems C) This code won't compile. The string should be in single quotes, i.e. 'Go Giants' D) This code won't compile. The data type should be stringarrow_forward
- 14- Which one of the following options best describes something that you must use indentation for in Python? a. To signify that a group of statements belong to a function. b. To differentiate between an integer and a float. c. To mark a line as a potential source of errors. d. To accept user input.arrow_forwardFirst time I'm using bartleby. This is the last question I have. Please help me finished. Language is Program C int getNum(); /*accepts input from the user*/ void display(int num); /*display the pattern*/ ------------------------------------------------------- Like most teenagers, you love chatting with your crush. We all believe that they're the one for us. We imagine spending the rest of our lives with them. We fantasize about them wherever we are, whether we are in our homes or even during classes! We are so addicted to them. However, one night, you saw on Facebook that your crush liked your friend's pic! You got so mad and jealous because for you, your definitely more fit with your crush than your friend because you're better in programming. Time to show off some programming skills by solving a pattern problem and post the result afterwards on your Instagram with a hashtag, #bitterinprogramming #imean #betterinprogramming Implement the following functions: int…arrow_forwardWhich of the following costs would be significantly impacted by poor readability? A.Executing Programs B.Compiling Programs C.Writing Programs D.Maintaining Programsarrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning