Please change this program to #include #include #include using namespace std; int main() { char V,x; int charges; cout<<"Select your vehicle:\nC\t=Car\nB\t=Bus\nT\t=Truck"; cin>>V; cout<<"Enter days to park the vehicle : "; cin>>x; switch(V) { case 'C': { charges=x*20; cout<<"Charges for Car is Rs."<
Q: #include <stdio.h>#include <stdlib.h> int cent50 = 0;int cent20 = 0;int cent10 = 0;int…
A: ISSUES IN QUESTION CODE:- TakeChange() function takes input from user using scanf function.The…
Q: In this lab, you complete a partially wri Cornwall's Country Inn. The program is described in…
A: Check the answer as well as meal plan whether they are valid or not In case of invalid strings…
Q: #include using namespace std; int main() { int x, y, z, w, visit; char s; cout>s;…
A: Given: #include <iostream>using namespace std; int main(){ int x, y, z, w, visit;…
Q: Purpose. Learn how to search an array, to count matching values. Requirements. Modify Exercise…
A: Start. Take the temperature for different days. Check the high and low for the week. Print the…
Q: P| Understanding if Statements In this lab, you complete a prewritten C++ program for a carpenter…
A: Given: // HouseSign.cpp - This program calculates prices for custom made signs. #include…
Q: # include void main() { float charge; cout >number_day; if(number_day>0&&<=7) charge =…
A: After going through the given program, following points are understood : 1. The program calculates…
Q: #include using namespace std; int main() { string name,address,c_qual,c_spec,c_status; int…
A: As I go through the code I found you didn't check that entered value is an integer or not. so you…
Q: EXPLAIN THIS CODE EACH LINE #include #include int main() { char name[20]; int…
A:
Q: #include <stdio.h>#include <stdlib.h> int cent50 = 0;int cent20 = 0;int cent10 = 0;int…
A: Algorithm: Algorithm is basically a set of instructions that are used to perform the particular…
Q: // SuperMarket.cpp - This program creates a report that lists weekly hours worked // by employees…
A: #include <vector> #include <iostream> #include <string> struct Day {…
Q: Lab 9-7: Overloading Functions in this lab, you complete a partially written C++ program that…
A: Function overloading is a feature that allows us to declare two or more functions having the same…
Q: #include using namespace std; int main() { int no_quizzes, original_no_quizzes; float grade,…
A: As per the given question, we have to modify the code provided. Current Code performs the following…
Q: // SuperMarket.cpp - This program creates a report that lists weekly hours worked // by employees of…
A: Program: Programs are the instructions given to the system in the form of a program to accomplish…
Q: // Cornwall.cpp - This program computes hotel guest rates.// Input: None// Output: Hotel guest…
A: Actually, c++ is a powerful general purpose language. It is a high level language.
Q: #include #include using namespace std; // declare functions void display_menu(); void…
A: Source Code : #include <iostream>#include <cmath>#include <cctype> // including…
Q: create a pusedocode #include #include #include using namespace std; int main (){ float…
A: Declare variables ga,fir,sec,thir,fin, q1, q2, q3, L1, L2, L3, L4, LP,t,fe,le,p,q; Input…
Q: ou think are the four most important factors? For optimal overall performance, which of the…
A: Introduction: The act of elevation, modifying, and streamlining software to keep it current with…
Q: c programming please fix my codes #include <stdio.h> #include<string.h> int main() {…
A: declare a structure of vegetable to store the name and quantity of vegetables array of vegetable…
Q: // P41.cpp - A simple elevator for 4 floors and a basement with a // close door button and 5 keys…
A: #include<iostream> #include<cmath> using namespace std; void close_door(); int…
Q: Create two more functions (options #3 and #4 in your menu) by taking the to_celsius() and…
A: C++ program for the above two problems :
Q: #include using namespace std; int times(int mpr, int mcand) { int prod = 0; while (mpr != 0)…
A: Actually, program is a executable software that runs on a computer.
Q: ow, modify it to do the following: Add two more functions to handle another type of…
A: Here we write simple function using function overloading:…
Q: Main.cpp #include #include "Deck.h" int main() { Deck deck; deck.shuffle();…
A: Main.cpp #include <iostream>#include "Deck.h" int main() { Deck deck; deck.shuffle();…
Q: #include <stdio.h>#include <stdlib.h> int cent50 = 0;int cent20 = 0;int cent10 = 0;int…
A: The flow of the program is good but still, the program has some bugs or exceptions, these exceptions…
Q: Main.cpp #include #include "Deck.h" int main() { Deck deck; deck.shuffle();…
A: Here are the UML class diagrams for the three classes:
Q: Flowchart, create. #include using namespace std; // Write function declaration here void…
A: This question comes from Programming Language flowchart designing which is a paper of Computer…
Q: change normal body temperature to 36.5–37.5 °C #include using namespace std; int main() { float…
A: Given, Change the code so that normal body temperature is 36.5–37.5 °C
Q: #include using namespace std; int times(int mpr, int mcand) { int prod = 0; while (mpr != 0)…
A: Converting c++ program into pep/9 assembly language The given c++ code is#include…
Q: #include using namespace std; void times(int& prod, int mpr, int mcand) { prod = 0; while (mpr…
A: Actually, program is a executable software that runs a computer
Q: #include using namespace std; int main() { string c_name, address, c_spe, c_status; int…
A: #include <iostream>using namespace std;int main(){string c_name, address, c_spe, c_status;int…
Q: #include #include using namespace std; // declare functions void display_menu(); void…
A: //given code:#include <iostream>#include <cmath> using namespace std; // declare…
Q: #include using namespace std; double average(int sum_of_grades,int num_grades) { return…
A: Algorithm: CalculateLetterGrade1. Include the necessary header file for input/output…
Q: #include using namespace std; int main() { int numbers[6] = {2, 7, 5, 6, 33, 35}; cout >"enter any…
A: One C++ Program is given in the question.
Q: In this lab, you complete a prewritten C++ program that computes the largest and smallest of three…
A: Here, first declare 3 variables for 3 integers. Then you can prompt user to enter 3 integers by…
Q: tream> #include #include using namespace std; void display(char ans); void display(int…
A: We often come around situations where we need to store a group of data whether of similar data types…
Q: #include #include using namespace std; int main() { float sp_Radius, sp_sa, sp_Volume; cout >…
A: main.cpp //Header files#include "SphereCalc.h"#include <iostream>using namespace std; //Main…
Q: #include #include #include using namespace std; void display(char ans); void…
A: An array stores multiple values in a sequential manner of a specific data type.The array can be…
Please change this program to #include<stdio.h>
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
char V,x;
int charges;
cout<<"Select your vehicle:\nC\t=Car\nB\t=Bus\nT\t=Truck";
cin>>V;
cout<<"Enter days to park the vehicle : ";
cin>>x;
switch(V)
{
case 'C':
{
charges=x*20;
cout<<"Charges for Car is Rs."<<charges ;
break;
}
case 'B':
{
charges=x*25;
cout<<"Charges for Car is Rs."<<charges;
break;
}
case 'T':
{
charges=x*30;
cout<<"Charges for Bus is Rs."<<charges;
break;
}
default:
cout<<"Invalid input";
}
return 0;
}
Step by step
Solved in 2 steps with 2 images
- #include using namespace std; int main() int x=1,y=2; for (int i=0; i<3; i++) e{ x=x*y; 8{ } cout<#include <stdio.h>#include <stdlib.h> int cent50 = 0;int cent20 = 0;int cent10 = 0;int cent05 = 0; //Function definitionvoid calculateChange(int change) {if(change > 0) {if(change >= 50) {change -= 50;cent50++;} else if(change >= 20) {change -= 20;cent20++;} else if(change >= 10) {change -= 10;cent10++;} else if(change >= 05) {change -= 05;cent05++;}calculateChange(change);}} //Define the functionvoid printChange() { if(cent50)printf("\n50 Cents : %d coins", cent50); if(cent20)printf("\n20 Cents : %d coins", cent20); if(cent10)printf("\n10 Cents : %d coins", cent10); if(cent05)printf("\n05 Cents : %d coins", cent05); cent50 = 0;cent20 = 0;cent10 = 0;cent05 = 0; } //Function's definitionint TakeChange() { int change;printf("\nEnter the amount : ");scanf("%d", &change);return change; }//main functionint main() {//call the functionint change = TakeChange(); //use while-loop to repeatedly ask for input to the userwhile(change != -1){if((change %…#include <stdio.h>#include <stdlib.h> int cent50 = 0;int cent20 = 0;int cent10 = 0;int cent05 = 0; //Function definitionvoid calculateChange(int change) {if(change > 0) {if(change >= 50) {change -= 50;cent50++;} else if(change >= 20) {change -= 20;cent20++;} else if(change >= 10) {change -= 10;cent10++;} else if(change >= 05) {change -= 05;cent05++;}calculateChange(change);}} //Define the functionvoid printChange() { if(cent50)printf("\n50 Cents : %d coins", cent50); if(cent20)printf("\n20 Cents : %d coins", cent20); if(cent10)printf("\n10 Cents : %d coins", cent10); if(cent05)printf("\n05 Cents : %d coins", cent05);cent50 = 0;cent20 = 0;cent10 = 0;cent05 = 0; } //Function's definitionint TakeChange() { int change;printf("\nEnter the amount : ");scanf("%d", &change);return change; }//main functionint main() {//call the functionint change = TakeChange(); //use while-loop to repeatedly ask for input to the userwhile(change != -1){if((change %…#include <stdio.h>#include <stdlib.h> int cent50 = 0;int cent20 = 0;int cent10 = 0;int cent05 = 0; //Function definitionvoid calculateChange(int change) {if(change > 0) {if(change >= 50) {change -= 50;cent50++;} else if(change >= 20) {change -= 20;cent20++;} else if(change >= 10) {change -= 10;cent10++;} else if(change >= 05) {change -= 05;cent05++;}calculateChange(change);}} //Define the functionvoid printChange() { if(cent50)printf("\n50 Cents : %d coins", cent50); if(cent20)printf("\n20 Cents : %d coins", cent20); if(cent10)printf("\n10 Cents : %d coins", cent10); if(cent05)printf("\n05 Cents : %d coins", cent05);cent50 = 0;cent20 = 0;cent10 = 0;cent05 = 0; } //Function's definitionint TakeChange() { int change;printf("\nEnter the amount : ");scanf("%d", &change);return change; }//main functionint main() {//call the functionint change = TakeChange(); //use while-loop to repeatedly ask for input to the userwhile(change != -1){if((change %…#include<stdio.h>#include<stdlib.h> int cent50=0;int cent20=0;int cent10=0;int cent05=0; void calculatechange(int* change){if(*change>0){if(*change>=50){*change-=50;cent50++;}else if(*change>=20){*change-=20;cent20++;}else if(*change>=10){*change-=10;cent10++;}else if(*change>=05){*change-=05;cent05++;}calculatechange(change);}}void printchange(){if(cent50)printf("\n50cents:%d coins",cent50);if(cent20)printf("\n20cents:%d coins",cent20);if(cent10)printf("\n10cents:%d coins",cent10);if(cent05)printf("\n05cents:%d coins",cent05);cent50=0;cent20=0;cent10=0;cent05=0;}void takechange(int* change){scanf("%d",change);getchar();}int main(){int change=0;int firstinput=0;while(1){if(!firstinput){printf("\nEnter the amount:");firstinput++;}else{printf("\n\nEnter the amount to continue or Enter -1 to…#include<stdio.h>#include<stdlib.h> int cent50=0;int cent20=0;int cent10=0;int cent05=0; void calculatechange(int* change){if(*change>0){if(*change>=50){*change-=50;cent50++;}else if(*change>=20){*change-=20;cent20++;}else if(*change>=10){*change-=10;cent10++;}else if(*change>=05){*change-=05;cent05++;}calculatechange(change);}}void printchange(){if(cent50)printf("\n50cents:%d coins",cent50);if(cent20)printf("\n20cents:%d coins",cent20);if(cent10)printf("\n10cents:%d coins",cent10);if(cent05)printf("\n05cents:%d coins",cent05);cent50=0;cent20=0;cent10=0;cent05=0;}void takechange(int* change){scanf("%d",change);getchar();}int main(){int change=0;int firstinput=0;while(1){if(!firstinput){printf("\nEnter the amount:");firstinput++;}else{printf("\n\nEnter the amount to continue or Enter -1 to…#include<stdio.h>#include<stdlib.h> int cent50=0;int cent20=0;int cent10=0;int cent05=0; void calculatechange(int* change){if(*change>0){if(*change>=50){*change-=50;cent50++;}else if(*change>=20){*change-=20;cent20++;}else if(*change>=10){*change-=10;cent10++;}else if(*change>=05){*change-=05;cent05++;}calculatechange(change);}}void printchange(){if(cent50)printf("\n50cents:%d coins",cent50);if(cent20)printf("\n20cents:%d coins",cent20);if(cent10)printf("\n10cents:%d coins",cent10);if(cent05)printf("\n05cents:%d coins",cent05);cent50=0;cent20=0;cent10=0;cent05=0;}void takechange(int* change){scanf("%d",change);getchar();}int main(){int change=0;int firstinput=0;while(1){if(!firstinput){printf("\nEnter the amount:");firstinput++;}else{printf("\n\nEnter the amount to continue or Enter -1 to…#include<stdio.h>#include<stdlib.h> int cent50=0;int cent20=0;int cent10=0;int cent05=0; void calculatechange(int* change){if(*change>0){if(*change>=50){*change-=50;cent50++;}else if(*change>=20){*change-=20;cent20++;}else if(*change>=10){*change-=10;cent10++;}else if(*change>=05){*change-=05;cent05++;}calculatechange(change);}}void printchange(){if(cent50)printf("\n50cents:%d coins",cent50);if(cent20)printf("\n20cents:%d coins",cent20);if(cent10)printf("\n10cents:%d coins",cent10);if(cent05)printf("\n05cents:%d coins",cent05);cent50=0;cent20=0;cent10=0;cent05=0;}void takechange(int* change){scanf("%d",change);getchar();}int main(){int change=0;int firstinput=0;while(1){if(!firstinput){printf("\nEnter the amount:");firstinput++;}else{printf("\n\nEnter the amount to continue or Enter -1 to…C++NoneFind errors / syntax error. Write line numberEXPLAIN THIS CODE EACH LINE #include <stdio.h>#include<string.h>int main(){ char name[20]; int meal,quantity; int drink,quantity2; char choose_meal[30] = ""; int meal_price; float drink_price, orderPrice; char choose_drink[30] = ""; float cash, change; printf("--------------------Marry's Fast Food--------------------"); printf("\n"); printf("Enter your name: "); scanf("%s", name); printf("Hello %s!\n", name); printf("\n\nWhat would you like to order?\n"); printf("------------------------MEALS------------------------\n\n"); printf("[1] 1 pc. Chicken Joy....................Php 76.00\n"); printf("[2] 1 pc. w/Jolly spaghetti..............Php 99.00\n"); printf("[3] pc. Spaghetti........................Php 55.00\n"); printf("[4] pc. Burger steak w/rice..............Php 85.00\n"); printf("[5] pc. Burger...........................Php 30.00\n\n"); printf("Choose a number…SEE MORE QUESTIONS