Write a C++ code that asks the user's name, then the code will ask the user to guess the password of four digits. The code will give the user four chances to enter a number of two digits for each time. If the user entered
Q: When you deposit money in a savings account at a bank, the bank pays you interest on that money. If…
A: Here our task is to implement a c# program that calculate the total amount after n years deposited…
Q: Q.5) Write a C++ code that asks the user's name , then the code will ask the user to guess the…
A: #include <iostream>using namespace std;int main(){ //varibale to hold name string name;…
Q: A. write a c++ program that asks the user to enter values for dollar and convert into peso. display…
A: ANSWER:-
Q: What will be printed after executing the following C++ code? int a=2, b=4, c=6, d3-5; if (d <= 0)…
A: Given C++ Program: int a = 2, b = 4, c = 6, d = -5; if(d<=0)…
Q: c. Write the output of the code given below? for( x=1; x <= 5; x++ ); { cout << "Hello World: " <<…
A: The output is as follows: Hello World: Hello World: Hello World: Hello World:
Q: Please help! in c++ or C please! Implement a simple security software program using symmetric key…
A:
Q: Write an application that will take 5 digits integer from user and calculate the sum of all digits…
A: Programming approach: Define the necessary header file using namespace. define the main()method.…
Q: What is the difference between Console.Write("message") and Console.WriteLine("message")
A: In c#, Console. Write() and Console. Write Line() both are used to print the data on the console…
Q: Q1) Write a Python program that reads username and password from the user and prints "successful…
A: correctUserName = "ABC@123"correctPassword = "12345" username = input("Enter username: ")password =…
Q: Create a loop-based C++ application that prompts for a positive integer and prints the factors of…
A: Algorithm: Start Read a number n Iterate through the loop from i=1 to i=n Print i Iterate through…
Q: Write a C language program which will take a real number and a character from the keyboard. The…
A: 1 km = 0.6214 miles 1 mile = (1/0.6214) km
Q: using System; class Program { publicstaticvoid Main(string[] args) { int number,max=-9999999,i=0;…
A: In order to get the sum of smallest and largest number, you need to 1st find the smallest and…
Q: in python an else statment must have the character ______ at the end of the line. a. : b. ! c.…
A: Here in this question we have asked that in python what character must be there in else statement at…
Q: Temperature of a city in Fahrenheit degrees is input through the keyboard. Write a program in C…
A: Step-1: Start Step-2: Declare variables fahren, cel Step-3: Take input from user and store in cel…
Q: Which Java/C++ data type do you use for the value 14.9? a. Int b. Float c.…
A: Answer given below:
Q: In c# is it possible to overload conditional operator? A. True B. False
A: HELLO THEREI AM ADDING ANSWER BELOWPLEASE GO THROUGH ITTHANK YOU
Q: 2. Write a console program that reads in an input for value (int) and computes (using mod) if value…
A: We need to read numbers continuously until the user enters a sentinel (0 we choose). The code is…
Q: the iostream file contains code that allows a C++ program to display output on the screen and read…
A: Explanation:- iostream is the name of the file in c++ that includes using the bracket that is…
Q: In C, Given an int variable n that has already been declared, write some code that repeatedly reads…
A: //include the required header file #include <stdio.h> //define main function int main() {…
Q: Write a C# application for a furniture company; the program determines the price of a table. Ask the…
A: Algorithm: To create this program we are using the if else conditional statement. Here using…
Q: What is the output of the following C++code? int x = 15; int y = 3; if (x + y > {y = x -x = y…
A: The given code contain several syntax error: int x = 15; int y = 3; if (x + y > { //error 1y =…
Q: In C++ and using command line arguments, how do you check if an argument is a double or integer?
A: The command line argument is of char* type. Hence, both double and integer values may seem same if…
Q: C++ Write a program that takes in a line of text as input, and outputs that line of text in…
A: Program approach: Including header files Starting the main function Initializing string variables,…
Q: What is the value of var after running the following piece of C code? int var-10; if (var10) var -…
A: Given code: int var =10; if(var<20) { var = var +5; if (var >10) { var = var +10; } else{…
Q: You can have more than one nested else-if in C program. O True O False A switch statement can have…
A: Given: 3Please answer the tree questions!
Q: Write the C++ code for a program that accepts two numbers from a user and displays one of the…
A: As per guidelines we answer only one question for answer of other question please ask separately
Q: 4 نقاط This code enters the value of x then calculate the summation of * .the following series s =…
A: Complete program is given below:
Q: please only write the code in your solution goes here part do not change anything else C++ #include…
A: In this question we have to complete the CoordTransform function to change the coordinated and the…
Q: Write a C++ program that permits users to enter the following information about your small company's…
A: In the solution of given problem a structure employee is used, which contain emp ID, Sex, hourly…
Q: Create a Programming Flowchart about this Identifies the five numbers with variables A, B, C, D, E.…
A: Here I have created a flow chart In the first step, I have declared 5 variables namely A, B, C, D,…
Q: C++ Create a program that reads a simple arithmetic expression and evaluates it. More precisely,…
A: Answer is given below:
Q: (Code the program in C language, which prompts with appropriate expressions such as your Large or…
A: We need to generate random number: Algorithms: 1. Read the integer 2. Use in built random function…
Q: What will be printed after.executing the following C++ code? int x-60, y-7, z-23B for (int k-10;…
A: In this question we have to execute and find the output of the given C++ code. Let's Execute it and…
Q: C++ When the user enters the 4 digits, 1234 into this program, they get a result of 189, but the…
A: #include <iostream> using namespace std; int main() { int number; // The original number //…
Q: Python's error handling process includes the finally clause. In the following code snippet, when is…
A: Try statement have an option finally Clause which is used to release external sources
Q: create a program in c that promts the user to enter a "bank amount" and a "wager amount". If the…
A: Take a variable for the bank amount as input. Take a variable for the wager amount as input. Use a…
Q: Optional parameters are represented with the following character: a. > b. = c. * d. ! e. ?
A: Optional parameters must be specified some value at the end of parameter otherwise it will throw…
Q: Write a C Program that allows a user to enter any number of student test scores until the user…
A: EXPLANATION: - A do...while loop is used to read the scores of the students till 999 is not entered…
Q: Write an application that will take 5 digits integer from user and calculate the sum of all digits…
A: Programming approach: // define the necessary header file using namespace. // using main()function.…
Q: Which Java/C++ data type do you use for the value "Joe"? a. Int b. Long c.…
A: Answer given below:
Q: Write a simple C# console application to accept the item name and item price. The program should…
A: Here is your code with an output .
Q: Write a C++ application that inputs one number consisting of five digits from the user. You will…
A: Task is to take a user input for a five digit number. Check if the number is five digit or not. If…
Q: What will be printed after executing the following C++ code? int x=60, y=7, z=2; for (int k=10; k…
A: {…
Q: Write a program that will accept a number n and display the sum of all even numbers and the sum of…
A: Algorithm: 1. Start 2. Declare variables i,n,sum_of_odd=0,sum_of_even=0 2. Get value of n from user…
Q: Write an application that allows a user to enter any number of student test scores until the user…
A: Program Approach: n is the user input integer variable which stores the number of students score is…
Q: The programming language is C++, write a program base on the given statement. Write a program that…
A: Note: Below is the required program in C++. Programming Approach: Defining necessary header files.…
Q: Hello I have written the code I was wondering is there a way to switch this code into running a…
A: SUMMARY: -Hence, we discussed all the points.
the password is 2341
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- C++ Help 2. The base price of a burger is $5. All monetary values must be represented as a decimal.3. Give the user a choice of patty using grouped radio buttons4. Give the user a choice of how many extra patties they want on their burger. The price of the burger includes 1 patty, this is to ask them how they may want in addition. Each additional patty is $.50. Valid entries are 0 to 3 and must be represented by a Slider control.5. Users can select if they want cheese via a CheckBox or other yes/no control.6. Users can select if they want bacon, this will add $1 to the cost. You can use a CheckBox or other yes/no entry mechanism.7. Ask the user for instructions about how they want their burger and any additional toppings via Textbox. This entry is optional.8. Ask the user for their name in a TextBox. This field is mandatory. The field must be highlighted if there is an error.9. A custom option of your choice using whatever selection criteria you want. It must be a required field and…4. 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; }c++ Write a program to use enumeration type to represent the seven colors of the rainbow, i.e. red, orange, yellow, green, blue, indigo and violet, as the enumerators in sequence, and red starts from 1. Then, ask the user to choose a value between the range of 1 – 7. If the user enters 3, the output will tell the user yellow has been chosen, and also display the previous and next colors of the chosen colors. If the user enters 1 or 7, display the chosen color and only next/previous color is displayed accordingly. Write the program in an infinite while loop, until a number which is beyond the range of 1 – 7 is entered. The sample output is as follows, Enter a number in the sequence of the rainbow color (1-7): 7 Violet is chosen. The previous color is indigo. Enter a number in the sequence of the rainbow color (1-7): 1 Red color is chosen. The next color is orange. Enter a number in the sequence of the rainbow color (1-7): 3Yellow is chosen. The previous color is orange and next…
- C++ Programming Exercise: A real estate office handles, say, 50 apartment units. When the rent is, say, $600 per month, all the units are occupied. However, for each, say, $40 increase in rent, one unit becomes vacant. Moreover, each occupied unit requires an average of $27 per month for maintenance. How many units should be rented to maximize the profit? Write a program that prompts the user to enter: a. The total number of of units. b. The rent to occupy all the units. c. The increase in rent that results in a vacant unit. d. Amount to maintain a rented unit. The program then outputs the number of units to be rented to maximize the profit.C++ Write a program that asks for the starting time and the number of minutes of the call, and displays the charges. The program should ask for the time to be entered as a floating-point number in the form HH.MM. For example, 07:00 hours will be entered as 07.00, and 16:28 hours will be entered as 16.28. Input Validation The program should not accept times that are greater than 23:59. Also, no number whose last two digits are greater than 59 should be accepted. Hint: Assuming num is a floating-point variable, the following expression will give you its fractional part: num – static_cast<int>(num);2:10 AM 58 Litie Write a C++ program to simulate the tasks of a vending machine. The machine accepts only coins from the customer. Initially, it displays the following message on screen: "Please insert coins". When a customer inserts a coin, the machine asks the him/her to select a drink (if the coins are enough) through entering its code. If the money inserted is enough, the machine will prepare the drink telling the customer that the drink is ready. It also calculates the cost of the drink and asks the customer if he wants another drink or wants to exit. If the remaining coins are enough, the same procedure applies when the customer asks for a new drink. Else, the machine displays the following message: "Not enough coins, Please insert coins, or "C" to exit". If the user presses "C", the machine returns the coins/ change to the user and displays the message "Please insert coins". hint You just use lostream library and for loop ...
- HW:2 Create a program with c++ that Ask the user to enter a month number between 1 and 12. The following seasons are associated with these months: Winter: 12, 1, 2 Spring: 3, 4, 5 Summer: 6, 7, 8 Fall: 9, 10, 11 Example: Enter a month number: 10 It is Fall Also: Check for legal input (valid entries are 1-12). If not a legal number output: "Invalid month. Enter number 1-12"Q9/Write a program that inputs a three-digit integer, separates the integer into its individual digits and prints the digits separated from one another by three spaces each by using functions. For example, if the user types in 429, the program should print: 4 2 9C++ Programming Problem: To make telephone numbers easier to remember, some companies use letters to show their telephone number. For example, using letters, the telephone number 438-5626 can be shown as GET LOAN. In some cases, to make a telephone number meaningful, companies might use more than seven letters. For example, 255-5466 can be displayed as CALL HOME, which uses eight letters. Write a program that prompts the user to enter a telephone number expressed in letters and outputs the corresponding telephone number in digits. If the user enters more than seven letters, then process only the first seven letters. Also output the hyphen after the third digit. Allow the user to use both uppercase and lowercase letters as well as spaces between words. Moreover, your program should process as many telephone numbers as the user wants.
- Q1: Write a C++ program to calculate the diagonal of a rectangle. Users are required to enter the length and width of the rectangle. If you enter negative values for length and width, you will receive a display message indicating incorrect input. Afterward, after verifying the validity of these variables, the rectangle's diagonal is calculated and displayed. Recall that d= vw2 +2. Write the code of Q1 in the space provide here 直 21°C j piltC++ write a program that calculates and prints the take-home pay for commissioned sales employee. Allow user to enter value for the name of employee and the sales amount for the week. Employee receive 7% of the total sales. Federal tax rate is 18%. Retirement contribution is 10%. Social Security tax rate is 6%. Use appropriate constantsQ5: A/ Use input function to write a computer programming to test the weather state according to a given temperature using the conditions helow : 1-x 30 hot weather. Choose one section from the following :