First, read in an input value for variable inCount. Then, read inCount integers from input and output each integer on a newline after the string "amount=". Ex: If the input is 3 75 70 40, then the output is: amount=75 amount=70 amount=40
Q: below is the code I need help with answering the questions in the image//
A: Here is the explanation about the scope of the variables:
Q: Write a program that reads in the first and last name of a person and formats the full name as the…
A: The Answer is in below Steps:-
Q: isset(); function returns _________ value. a.
A: isset() function return ...
Q: #include int main() { char a = '\012'; printf("%d", a); return 0; }
A: Please find the answer below :
Q: #include #include void LineFunc(void); void main() { int a, b; printf("Enter a :"); scanf_s("%d",…
A: The program after compilations gives an error that is So the error in this has occurred due to…
Q: Fix it please #include using namespace std; int main()
A: include<iostream>using namespace std;int main(){char item1[20]="Fresh Milk",…
Q: Given the following code and output: int a[] = {10, 20, 30, 40}; cout << a << endl; Example Output…
A: Please find the answer to the above question below:
Q: Copy the code provided and paste the code into the code window. The following code reads in a value…
A: Here is your solution -
Q: Pass the first parameter by reference and the second parameter by value. 1 char mein ( int c, char…
A: Given code: char mein(int c, char i) { c=50; i= (char) c; cout<< (int)c+i<<endl; return…
Q: include int main() { char a = '\012'; printf("%d", a); return 0; }
A: Please find the answer below :
Q: /* Program Name: BadDate.cpp Function: This program determines if a date entered by the user is…
A: Required C++ code according to sample code provided given below :
Q: #include #include int LineFunc(void); int main() { int a, b; printf("Enter a :"); scanf("%d", &a);…
A: In code draws a line which is in the form of y = mx+c The input to the code is a and b where a = m…
Q: I have a problem with this code can please fix it and explain it for me: //header files…
A: I have given an answer in step 2.
Q: #include int main() { char a = '\012'; printf("%d", a); return 0; } Output:
A: Please find the answer below :
Q: 21. Draw the logic symbol and develop a truth table for a 2 input NAND gate. 22. Draw the logic…
A: The Logic Symbols & Truth Tables for 2 Input NOR & NAND Gate are given in the Step 2
Q: Now, modify it to do the following: Modify the while loop to utilize tolower() or toupper(). Add…
A: So for first we will use tolower. tolower(A) changes A to a. So even if we enter Y or N, it will be…
Q: #include <iostream> using namespace std; void additionProblem(int topNumber, int bottomNumber)…
A: Algorithm : 1. Start 2. Initialize the correct count variable to 0. 3. Initialize the count variable…
Q: the pseudocode for this program? #include #include void main() { char grade[2]; int credithours1,…
A: Objective: A pseudocode should be mentioned for the given C program. It includes all the operations…
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: Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both…
A:
Q: CENGAGE MINDTAP Programming Exercise 8-3A Instructions CarCareChoice.java + Write an application for…
A: Step-1: Start Step-2: Print the list of available services Step-3: Take input form user corresponds…
Q: // Add to this partially built code // fill in code where there is a TODO #include using namespace…
A: Add data type char for variables destination and typeOfDay. Define bool variable isDayTime and…
Q: Int number[-9]; * true False
A: Since you have asked multiple questions, we will solve the first question for you. If you want any…
Q: C++ Code Only: One day, Fred and his N friends were playing a card game in which each player throws…
A: Here, we are tasked with developing a Python system that will help Fred browse the card in a way…
Q: Q5: What would happen if you passed in the address of the initialized global variable into…
A: we can access global variable if there is a local variable through EXTERN and scope resolution . The…
Q: Forms often allow a user to enter an integer. Write a program that takes in a string representing an…
A: Forms often allow a user to enter an integer. Write a program that takes in a string representing…
Q: int numl = 2; int num2 %3D 93B int num3 = num2 % num1; if (numl + num2 > 7) %3D { int num2 = num3 +=…
A: given code: int num1=2; intnum2=9; intnum3 = num2 % num1; if (num1 + num2 > 7) { intnum2 =…
Q: int x = 0; int sum = 0; for (x = 5; x < 5; x = x + 1) { } cout << sum; What is the value of sum…
A: What is the value of sum printed? Ans - 0 Explanation - The initial value of x is 5 inside for…
Q: This program determines the minimum and maximum of three values inputby // the user and performs…
A: c++ program determines the minimum and maximum of three values input three int values output is…
Q: #include #include using namespace std; // declare functions void display_menu(); void…
A: Source Code : #include <iostream>#include <cmath>#include <cctype> // including…
Q: Complete main() to read dates from input, one date per line. Each date's format must be as follows:…
A: Step-1: StartStep-2: Declare a vector of string as inputDatesStep-3: Start a while loop till it's…
Q: Flowchart, create. #include #include using namespace std; double computeRate(int); double…
A: Here our ask is to draw a flow chart to the given program. First, let's understand the program a…
Q: 9-The script in the left side is used to solve the right-side equation.
A: true
Q: include int main() { char a = '\012'; printf("%d", a); return 0; }
A: Please find the answer below :
Q: 4- Determine the output of the following code after clicking the button Try it function…
A: Given code in the question <!DOCTYPE html><html><body> <button…
Q: Tamespac int main() 5- { int m=11, t=5, k=4; k=m++ +t; 8. cout <« "\n the value of k is : "; cout <<…
A: The output of above code will be: 16
Q: nteger variable numYards is read from input. Type cast numYards to a double. Ex: If the input is…
A: The below code will read an integer from the user input and type cast the variable to a double.…
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: int input; cout << "enter input " << endl; cin >> input; int…
A: Program: //include the header file #include <iostream> using namespace std; //definition of…
Q: hat's the difference between SSL and TLS? Exists a distinction between these terms?
A: SSL: Included in the Secure Sockets Layer security technology are the domain name and browser. A…
Q: my_round(number, integer): Based on the built-in round(...) function. Takes an integer or float and…
A: def my_round(number,integer): x = round(number,integer) return x print(my_round(1234.5678,-2))…
Q: #include#include#includeusing namespace std;// outputHtmlTitle// parameters// This function...void…
A: We need to print the html, head and title tag in the outputHtmlTitle() method.The outputHtmlTitle()…
Q: Choose the correct statem (i.e. 01 to 12) and stores it using two integers "kl" and "ko". Next, the…
A: Programs are the set of lines of code that is used to provide instructions to the computer. The…
Q: Complete PrintRank() to output "rankPointer is null." if rankPointer is null. Otherwise, output the…
A: Define the problem: Understand and define the problem that you need to solve. Gather information:…
Q: Convert totalYears to millennia, decades, and years, finding the maximum number of millennia, then…
A: We will use basic math operators provided in C++ languageWe will use divide operator /We will also…
Q: //below is the code I need help with answering the questions in the image// #include…
A: #include <stdio.h> #include <stdlib.h> typedef struct{ char name[30]; int id;…
Q: Modify the program so that the user can enter as many courses as they want. The final result is a…
A: Instructions to remove the error from the program: Use all these header files: #include…
Q: Q5: What would happen if you passed in the address of the initialized global variable into…
A: In the current code there is not initialized global employee variable But if there was a global…
First, read in an input value for variable inCount. Then, read inCount integers from input and output each integer on a newline after the string "amount=".
Ex: If the input is 3 75 70 40, then the output is:
amount=75
amount=70
amount=40
Step by step
Solved in 4 steps with 1 images
- #include <stdio.h>#include <stdlib.h>int LineFunc(void);int main(){int a, b;printf("Enter a :");scanf("%d", &a);printf("Enter b :");scanf("%d", &b);LineFunc();printf("\n\n");system("pause"); }int LineFunc(void){int i,j;int a=1, b = 0, y; for (i = -10; i < 11; i++){for (j = 10; j > -11; j--){y = a * i + b;if (i == 0 ){printf("-");}else if (j == 0){printf("|");}else if (i == 0 && j == 0){printf("+");}else if (y == j){printf("*");}elseprintf(" ");}printf("\n");} } Could you please write the code that gives different results for each value in the chart?I have this code now. #include <iostream> #include <string> #include <fstream> using namespace std; string mixColors(int color1, int color2) { string mixedColor; if ((color1 == 0 && color2 == 1) || (color1 == 1 && color2 == 0)) { mixedColor = "purple"; } else if ((color1 == 0 && color2 == 2) || (color1 == 2 && color2 == 0)) { mixedColor = "orange"; } else if ((color1 == 1 && color2 == 2) || (color1 == 2 && color2 == 1)) { mixedColor = "green"; } else { mixedColor = "No Mix"; } return mixedColor; } //reads colors from a file int getUserInput(ifstream& inFile) { int color; inFile >> color; return color; } void writeOutputToFile(ofstream& outFile, int color1, int color2, const string & mixedColor){ outFile << "Mixed color selected (" << color1 << " and " << color2…// Swap.cpp - This program determines the minimum and maximum of three values input by // the user and performs necessary swaps. // Input: Three int values. // Output: The numbers in numerical order. #include <iostream> using namespace std; int main() { // Declare variables int first = 0; // First number int second = 0; // Second number int third = 0; // Third number int temp; // Used to swap numbers const string SENTINEL = "done"; // Named constant for sentinel value string repeat; bool notDone = true; //loop control // Get user input cout << "Enter first number: "; cin >> first; cout << "Enter second number: "; cin >> second; cout << "Enter third number: "; cin >> third; while(notDone == true){ // Test to see if the first number is greater than the second number // Test to see if the second number is greater than the third number // Test to…
- Untitled Section This is a segment of program, when it executed with multiple values for n and s the program displays the value of f, choose which output of f values are wrong answers cin>>x>>y; if (x>1) &&(y<5) {f=x+y*9; else f-x-y-11; } cout<draw flow char for this code is easy 2 #include 3- int main() { 4 char c; 5 6 7 8 9 ▾ 10 11 12 13 14 15 16 17 18 19 20 21 22 23 } printf("Enter a character: "); scanf("%c", &c); // Convert Lowercase to uppercase and vice versa if (c >= 'a' && c = 'A' && c <= 'Z') { c = c + 32; // Convert uppercase to Lowercase } 2. Write a C program that ask the user to enter a character then the program will print the input character and the next characters in ascending order up to character 'Z'. (Note: if the user enters lower case character, the program will print lower case character and vice versa) } // Print the character and subsequent characters in ascending order while (c <= 'Z') { printf("%c ", c); C++; 32; // Convert Lowercase to uppercase printf("\n"); return 0; Enter a character: v V W X Y Z input#include <iostream>#include <string>#include <fstream>#include <iomanip>#include <sstream> #include "card.h"#include "deck.h"#include "hand.h" using namespace N; using namespace std; /**main() controls the operation of the program*/ int main(){string repeat = "Y";Deck myDeck;Hand myHand;string exchangeCards; while (repeat == "Y" || repeat == "y"){cout << endl; myHand.newHand(myDeck);myHand.print();cout << endl; cout << "Would you like to exchange any cards? [Y / N]: ";getline(cin, exchangeCards); while (exchangeCards != "Y" && exchangeCards != "y" && exchangeCards != "X" && exchangeCards != "n"){cout << "Please enter Y or N only: ";getline(cin, exchangeCards); } if (exchangeCards = "Y" || exchangeCards = "y"){myHand.exchangeCards(myDeck);}cout << endl; myHand.print(); cout << endl; myDeck.reset(); // Resets the deck for a new game cout << "Play again? [Y / N]: ";getline(cin, repeat);while…#include#include#includeusing namespace std;// outputHtmlTitle// parameters// This function...void outputHtmlTitle(ofstream & fout, string title){fout << "" << endl;fout << "" << endl;fout << "" << endl;fout << "" << endl;fout << title << endl;fout << "" << endl;}void outputHtmlFooter(ofstream & fout){fout << "" << endl;fout << "" << endl;}void outputHtmlList(ostream & fout, string first, string second, string third){fout << "" << endl;fout << "\t" << first << "" << endl;fout << "\t" << second << "" << endl;fout << "\t" << third << "" << endl;fout << "\t" << endl;}void main(int argc, char * *argv){ofstream htmlFile("myIntro.html");string title;cout << "Please enter the title: ";getline(cin, title);outputHtmlTitle(htmlFile, title);string name;string course1, course2, course3;cout…If integer temperatureCelsius is 37, output "Body temperature". Otherwise, output "Not body temperature". End with a newline. Ex: If the input is 37, then the output is: Body temperature #include <iostream>using namespace std; int main() { int temperatureCelsius; cin >> temperatureCelsius; /* Your code goes here */ return 0;}It wont display the order total // JumpinJava.cpp - This program looks up and prints the names and prices of coffee orders. // Input: Interactive // Output: Name and price of coffee orders or error message if add-in is not found #include <iostream> #include <string> using namespace std; int main() { // Declare variables. string addIn; // Add-in ordered const int NUM_ITEMS = 5; // Named constant // Initialized array of add-ins string addIns[] = {"Cream", "Cinnamon", "Chocolate", "Amaretto", "Whiskey"}; // Initialized array of add-in prices double addInPrices[] = {.89, .25, .59, 1.50, 1.75}; bool foundIt = false; // Flag variable int x; // Loop control variable double orderTotal = 2.00; // All orders start with a 2.00 charge // Get user input cout << "Enter coffee add-in or XXX to quit: "; cin >> addIn; // Write the rest of the program here. while(addIn != "XXX") //loop until user…// LargeSmall.cpp - This program calculates the largest and smallest of three integer values. #include <iostream> using namespace std; int main() { // This is the work done in the housekeeping() function // Declare and initialize variables here int largest; // Largest of the three values int smallest; // Smallest of the three values // Prompt the user to enter 3 integer values // Write assignment, add conditional statements here as appropriate // This is the work done in the endOfJob() function // Output largest and smallest number. cout << "The largest value is " << largest << endl; cout << "The smallest value is " << smallest << endl; return 0; }Flowchart, create. // Cornwall.cpp - This program computes hotel guest rates. // Input: None // Output: Hotel guest rate #include <iostream> #include <string> using namespace std; double computeRate(int); double computeRate(int, string); int main() { int days; string mealPlan; string question; double rate = 0.0; cout << "How many days do you plan to stay? " << endl; cin >> days; cout << "Do you want a meal plan? Y or N: " << endl; cin >> question; // Figure out which arguments to pass to the computeRate() function and // then call the computeRate() function cout << "The rate for your stay is $507" << rate << endl; cout << "The rate for your stay is $599.94" << rate << endl; return 0; } // End of main() function // Write computeRate functions here.//below is the code I need help with answering the questions in the image// #include <stdio.h> #include <stdlib.h> struct employees { char name[20]; int ssn[9]; int yearBorn, salary; }; // function to read the employee data from the user void readEmployee(struct employees *emp) { printf("Enter name: "); gets(emp->name); printf("Enter ssn: "); for (int i = 0; i < 9; i++) scanf("%d", &emp->ssn[i]); printf("Enter birth year: "); scanf("%d", &emp->yearBorn); printf("Enter salary: "); scanf("%d", &emp->salary); } // function to create a pointer of employee type struct employees *createEmployee() { // creating the pointer struct employees *emp = malloc(sizeof(struct employees)); // function to read the data readEmployee(emp); // returning the data return emp; } // function to print the employee data to console void display(struct employees *e) { printf("%s",…SEE MORE QUESTIONS