14. Personal information Write a program that displays the following pieces of information, each on a seperate line: Your name Your address, with city, state and ZIP code Your telephone number Your college major Use only a single cout statement to display all of this information.
Q: Q3. (Dice Rolling) Write a program that simulates the rolling of two dice. The program should use…
A: Given:
Q: (Financial application: payroll) Write a program that reads the following infor- mation and prints a…
A: CODE:- # Get the employee's namename = input("Enter employee's name: ")# Get the number of hours…
Q: 1.Balloon Emporium sells both latex and Mylar balloons. The store owner wants a pro-gram that allows…
A: Answer:-
Q: Q2. Write a program to get the marks in 5 subjects. Calculate the total and grade. Display name,…
A: As per requirement code is done in online compiler....
Q: (Print distinct numbers) Write a program that reads in ten numbers and displays the number of…
A: The required Java code is: import java.util.Scanner;public class Distinct{ public static void…
Q: Exercise 2: Ask for a favorite song, favorite movie, and favorite book. Use print statements to ask…
A: Use scanner class methods to accept input from user and nextLine() method is used to read a string…
Q: 3.17 (Game: scissor, rock, paper) Write a program that plays the popular scissor–rock–paper game.…
A: Answer :
Q: Complete the following program skeleton so it asks for the user’s weight (in pounds) and displays…
A: PROGRAM CODE: #include <iostream> using namespace std; int main(){ double pounds,…
Q: 7. Test Average and Grade Write a program that asks the user to enter five test scores. The program…
A: /*Java Program that ask user to enter 5 test scores and displays letter grade for each score and…
Q: Activity #2: Taking limits to compute derivatives Write a program named Lab5a_Act2.py to compute a…
A: Actually. Python is a easiest programming language. It is a dynamically typed programming language.
Q: Body Mass BMI) IS offen Used to defermin mether person lifestyle is overweight or underweight for…
A: #include <stdio.h>#include <math.h>int main(){float wt,ht,bmi;int ch;printf("bmi…
Q: 1 //This program will ask for the user's grades in Math, English, and Science. It will then display…
A: ISSUES IN THE ORIGINAL CODE: In line 1, the # symbol is missing which is mandatory for including…
Q: - Age - Thename of the City - Thename of the College - Aprofession - Atype of an animal - Apet's…
A: C++ used to answer this question
Q: Programming Exercise 2-8 // Declare variables for food charges, tip, tax, and total. Declare Real…
A: Here I have created constants using the final keyword to store the value of tip and tax rate. Then,…
Q: 2) triangle.py Write a program that will ask the user to input three positive numbers in descending…
A: Given, 3 numbers from the user which are descending in nature. Let us consider those 3 numbers are…
Q: 3. (Days of a month) Write a program that prompts the user to enter a year and the first three…
A: The required Java code is: import java.util.Scanner;public class Main { public static void…
Q: 2.5 Examine the following program. // This program uses variables and literals. #include using…
A: Fixed values that can't be changed during program execution is called as literals. It can be…
Q: 4. Printing a grid. Write a program that prints the following grid to play tic-tac-toe. +--+ + I T |…
A: public class Main{ public static void main(String[] args) { String bottom = "+--+--+--+";…
Q: Program 3: 1. Create a String constant ‘SPACE’, which holds a space ( “ “ ). final String SPACE =…
A: JAVA is an advanced programming language used to develop various applications software and system…
Q: **3.23 (Geometry: point in a rectangle?) Write a program that prompts the user to enter a point (x,…
A: C++ Program for above : #include <iostream> using namespace std; int main() { int…
Q: *4.17 (Game: scissor, rock, paper) Write a program that plays the popular scissor-rock- paper game.…
A: The pogram is given below:-
Q: Hospital Patients Write a program that computes and displays the charges for a patient’s hospital…
A: Programming is a way to instruct the computer devices to operate. Every computer needs a set of…
Q: Q1. Write a program that takes your full name as input and displays the abbreviations of the first…
A: As no programming language is mentioned it is solved using basic python
Q: The Fibonacci series is a series that begins with 0 and 1 and has the property that each succeeding…
A: PROGRAM CODE: #include <iostream> // include header file for input output stream…
Q: 4.15 LAB: Hailstone sequence Given a positive integer n, the following rules will always create a…
A: Ans: Code: n = int(input())print(n, end='\n')while n > 1: if n % 2 == 0: n = n//2…
Q: 3. (Days of a month) Write a program that prompts the user to enter a year and the first three…
A: Java program is written which calculates the number is days in the month. It is user driven program…
Q: 4.15 LAB: Hailstone sequence Given a positive integer n, the following rules will always create a…
A: Python is one of the most popular programming language.And it is oops and high level programming…
Q: C++ Demonstration #3: Create a program that will arrange the values c A, B and C in ascending order…
A: #include <iostream>using namespace std; int main(){ //Sort three numbers. int A =…
Q: 4.15 LAB: Hailstone sequence Given a positive integer n, the following rules will always create a…
A: Complete Code in C with explanation in the comment: #include <stdio.h> int main() {…
Q: Exercise 6: Two points in a plane are specified using the coordinates (x1, y1) and (x2, y2). Write a…
A: Logic: Accept x1 y1 x2 y2 values from user. Calculate slope using the formula. Print output on…
Q: Complete the program to read four values from input and store the values in variables first_name,…
A: Note: The code is written in python language as the language is not mentioned. Given: To write a…
Q: main(){ int a = 10, b=0, c=%3; b = a+5; C=a; cout << a << "" * "<<C<<endl3; <<b<<
A: Please find the answer below :
Q: 1 #inlcude using namespace std; 3 int main() 4日{ 2 float a; cin>>a; if (a==0): cout0): 10 11
A: Given:
Q: Assume that gambling Greg often goes to the Dog Racing Track. Greg loves to bet on the puppies. In…
A: #include<stdio.h> #include<limits.h> #include<stdlib.h> #include<time.h>…
Q: program4_2.py Write a program that displays a table of inches from 1-12 and equivalent lengths in…
A: Pseudocode: initializes variables inch_to_cm=2.54, inch=1 take while loop until inches<=12…
Q: Design function called month_name() which takes the month number as a parameter and returns a string…
A: Store all the months names in list and then we return the value present at index number-1
Q: 6. (Display the first days of each month) Write a program that prompts the user to enter the year…
A: Program: import java.util.Scanner; public class Main { // months name[] // 0 index is empty so…
Q: 2.15 (Geometry: area of a hexagon) Write a program that prompts the user to enter the side of a…
A: here in this question we have asked to write a program which take hexagon side from the user and…
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: int number = 4; String movie System.out.print("My favorite movie is "); System.out.print (movie +…
A: Required: In the space below, write out EXACTLY what the code fragment above will output when the…
Q: Activity #2: Taking limits to compute derivatives Write a program named Lab5a_Act2.py to compute a…
A: Since you are asking multiple questions, we are answering first question for you. If you want…
Q: C# Question Write a statement that declares a variable words and initialize it to the following…
A: Here is the statement that declares a variable words and initialize it to the following list of…
Q: Question 7
A: Following is the C++ program and its approach is given below: Declare necessary header files.…
Q: Show what the program segment would display on the screen. int x = 2;…
A: Please find the answer below :
Q: 6. (Display the first days of each month) Write a program that prompts the user to enter the year…
A: import java.util.Scanner;public class Exercise7 { public static void main(String[] strings) {…
Q: #include using namespace std; int main() Il your code here cout « "Your code goes here in"; A.…
A: The programming methodology for the program is given by: Including header files Main function Print…
Q: Program 3: 1. Create a String constant 'SPACE', which holds a space ( “ “). final String SPACE = /*…
A: Given:
Q: Summary 2 EmployeeBonus.py - This program calculates an emplo productivity bonus. 3 In this lab, you…
A: Decision making is needed to execute a code or block of statements only if a certain condition is…
Q: 3. (8 marks) Write a program that asks the user to enter his\her first name. Then, it asks the user…
A: #include <iostream>using namespace std; int main(){ string myFirstName = "James"; string…
14. Personal information
Write a
Your name
Your address, with city, state and ZIP code
Your telephone number
Your college major
Use only a single cout statement to display all of this information.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- Q1. Write a program that takes your full name as input and displays the abbreviations of the firstand middle names except the last name which is displayed as it is. For example, if your name isRobert Brett Roser, then the output should be R.B.Roser.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; }7.5 LAB: Name format Many 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. I'm taking a class on python and the lab assignment asks... Many 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. So far I have... firstName = input() middleName = input() lastName = input() lastName2 = input() firstName2 = input() print(lastName+ ',',…
- Assume variables a, b, c, are declared int and are initialized. Write code that will find the largest value of a, b, and c, and store the largest value to int variable smallest. (code in C)09. Paint Calculator Write a C program that allows the user to enter values for the width and length of a wall in feet and price per gallon of paint. Assume that a gallon of paint covers 350 square feet of a wall. The program outputs the area of the wall in square feet, the number of gallons needed and the cost of the job.19.3 LAB: Hailstone sequence Given a positive integer n, the following rules will always create a sequence that ends with 1, called the hailstone sequence: If n is even, divide it by 2 If n is odd, multiply it by 3 and add 1 (i.e. 3n +1) Continue until n is 1 Write a program that reads an integer as input and prints the hailstone sequence starting with the integer entered. Format the output so that ten integers, each separated by a tab character (\t), are printed per line. The output format can be achieved as follows:print(n, end='\t') Ex: If the input is: 25 the output is: 25 76 38 19 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1 Use Python, please.
- The prices of children's books, novels and dictionaries sold in a stationery are determined as follows: Children's book: 5$ each Novel: 0.1 $ per page for the first 200 pages, and an additional 0.05 $ for each page after 200 Dictionary: Pocket dictionaries 7.5 $, large dictionaries $ TL Develop the C program that calculates the price of the book (c, C, r, R, s or S) whose first letter is entered as capital or lowercase letters, by reading the required information for each book type from the keyboard and writing it on the screen. If the type of book or dictionary type is entered incorrectly, an appropriate error message should be displayed on the screen and the program should be terminated. NOTE: For example, enter c or C for pocket dictionary and b or B for large dictionary. Sample Output-1 Sample Output-2 Sample Output-3 Enter the book type (c, C, r, R, s, S): R Enter the number of pages: 250 Total Price = 22.50 TL Enter the book type (c, C, r, R, s, S): s Enter…program4_2.pyWrite a program that displays a table of inches from 1-12 and equivalent lengths in centimeters. You can find the conversion factor online if necessary. Store this factor in a properly named constant in your program. Display the inches accurate to one decimal place in a column 6 characters wide and the centimeters accurate to two decimal places in a column 8 characters wide. Include pseudocode. Required Output Inches: CM 1.0 2.54 2.0 5.08 3.0 7.62 4.0 10.16 5.0 12.70 6.0 15.24 7.0 17.78 8.0 20.32 9.0 22.86 10.0 25.40 11.0 27.94 12.0 30.48What will the following program display? #include using namespace std; int main() { int unus, duo, tres; unus = duo = tres = 5; unus += 4; duo *= 2; tres −= 4; unus /= 3; duo += tres; cout << unus << endl; cout << duo << endl; cout << tres << endl; return 0; }
- Computer Fundamentals and Programming 2 Write a program that determines a student’s grade. The program will accept 3 scores and computes the average score. Determine the grade based on the following rules: - If the average score is equal or greater than 90, the grade is A. - If the average score is greater than or equal to 70 and less than 90, the grade is B. - If the average score is greater than or equal to 50 and less than 70, the grade is C. - If the average score is less than 50, the grade is F. Source Codes and Print Screen of the Output2.34 LAB: Input: Mad Lib Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (and hopefully funny) ways. Complete the program to read the needed values from input, that the existing output statement(s) can use to output a short story. Ex: If the input is: Eric Chipotle 12 cars the output is: Eric went to Chipotle to buy 12 different types of cars.C++ Angle Calculator Write a program that asks the user for an angle, entered in radians. The program should then display the sine, cosine, and tangent of the angle. (Use sin, cos, and tan library functions to determine these values.) The output should be displayed in fixed-point notation, rounded to four decimal places of precision.