Write a program that reads in the first and last name of a person and formats the full name as the last name, followed by a comma, a space, and the first name. For example: Please enter your first and last name on the next line. Harry Morgan Morgan, Harry
Q: Write a program that displays all the numbersfrom 100 to 1,000, ten per line, that are divisible by…
A: Declare the integer variables to hold the minimum and maximum values of the range, 100 and 1000.…
Q: Write a program to simulate showing an NBA Team on a Basketball court. Here is an example of the…
A: Given Data:- The code is given below on step 2
Q: Write a program with total change amount as an integer input, and output the change using the fewest…
A: Use an if-else to check whether the denomination is singular or plural and based on that print the…
Q: Write a program that takes your full name as input and displays the abbreviations of the first and…
A: NOTE: SINCE THE LANGUAGE OF THE PROGRAM IS NOT GIVEN, I HAVE USED PYTHON FOR THE SOLUTION Define…
Q: Write a program that asks the user for a word, then prints out the word once on the first line,…
A: Algorithm: Input word from user Append a space to the input word Iterate a for loop for variable i…
Q: Write a program that asks the user for a word, then prints out the word between the word bread, to…
A: Please find the answer below :
Q: Write a program to process a collection of daily high temperatures. Your program should count and…
A: Required:
Q: Write a program that asks the user to type the coordinate of 2 points, A and B (in a plane), and…
A: Note :-You have not mention the language of the program, so i'm answering your question in C++. Your…
Q: a * (b - c / d) + ++ Num2 where a, b, c and d are float type variables. b) Write a program that…
A: The solutions for the given three scenarios is being explained in the below steps which is being…
Q: Write a program that prompts the user to enter the minutes (e.g., 1 billion), and displays the…
A: NOTE: SINCE THE LANGUAGE OF THE CODE IS NOT MENTIONED, I HAVE USED JAVA FOR THE SOLUTION. Define…
Q: write a program that reads the height in centimeters and then converts the height to feet and…
A: NOTE: As the programming language is not mentioned in the question. So, we have solved this question…
Q: Write a program that prompts the user to enter the students’ names and their scores on one line, and…
A: Output:
Q: Write a program that gets two car information from the user, compares them, and print out the…
A: First, we need to define Car class with the attributes and methods and then define the main function…
Q: Write a program which reads two integer numbers from users and then display all prime numbers within…
A: According to the Question below the Complete Program: Program Output:
Q: Write a program that can be used by a small theater to sell tickets for performances. The theater’s…
A: Introduction: In this question, we have to write a program that asked for the prices of each seat of…
Q: Write a program that displays allthe numbers from 100 to 200, ten per line, that are divisible by 3…
A: Let us consider a java program that displays all the numbers from 100 to 200 ten per line, that are…
Q: Write a program that displays, ten numbers per line, all the numbers from 100 to 1,000 that are…
A: Program code: #declaring required variables num = 1 #for loop for i in range(100, 1001): #if…
Q: Write a program that asks the user the number of hours an employee worked and his hourly wage,…
A: #include <iostream>using namespace std; int main() { int hours=0,wage=0; double…
Q: Write a program to convert a measurement given in feet to the equivalent number of (a) yards, (b)…
A: Program requirements: The c++ program prompts the user to enter the value for feet and then…
Q: /Write a program that reads from the user a set of numbers, and first, it has to check how many…
A: Note: Since no programming language is mentioned. I am attempting this in python. if you need it…
Q: Write a program that prompts the user to enter the three dimensions, possibly with decimals, of a…
A: //Solution in C++ #include<iostream>#include <iomanip>using namespace std;int main(){…
Q: Write a program that prompts the user to enter thecenter x-, y-coordinates, width, and height of two…
A: Since, programming language is not mentioned in the question, we will answer this question in Java…
Q: Write a program that prints a grocery receipt of items purchased.
A: The Given program is to print a grocery receipt
Q: Write a program that creates a login name for a user, given the user's first name, last name, and a…
A: Textual Python Code :- firstName = input ("Enter first name :")lastName = input("Enter last name :…
Q: Create a program which will read a phrase from the user and create a framed version of it for…
A: 1.#Begin 2.Phrase = input("Please Enter a Phrase:\t") 3.Position = input("Please Enter the…
Q: write a program that reads a line of text and then displays the line, but with the first occurrence…
A: Given below program reads the first occurrence of “hate” and displays “love “ in place of “hate”.
Q: Write a program that prompts the user for a U.S. dollar amount and then converts it to Japanese Yen,…
A: Purpose: In this the dollar has to be converted into yen, Pound, Currency and then it has to…
Q: Write a program to read in a collection of 5 exam scores ranging from 1 to 100. Your program should…
A: Program plan: Create an array and declare the respective variables Prompt for the 5 numbers from…
Q: Write a program to take title, first name, last name and then print greeting card
A: Write a program in JAVA language that takes input title, first name, last name from user and prints…
Q: Write a program to print the lyrics of the song “Old MacDonald." Your program should print the…
A: Step 1 : Start Step 2 : Using a print() statement to print the first verse of the lyrics. Step 2 :…
Q: Write a program that moves a forester unit and a mountaineer unit to a given target location and…
A: Given:-
Q: Write a numpy program to get the dates of today, yesterday, day before yesterday, tomorrow, day…
A: #importing numpyimport numpy #getting todays date using datetime64 function…
Q: Write a program that displays, ten numbers per line, all the numbers from 100 to 200 that are…
A: Write a program that displays, ten numbers per line, all the numbers from 100 to 200 that are…
Q: Write a program that will Input the name , position of the employee , Input the rate per hour, hours…
A: Program: #include <iostream> using namespace std; int main() { string name; int…
Q: Write a program that displays the classic BINGO game, displays a BINGO card (5x5 square), and tests…
A: I have solve the problem in C++ code with comments for easy understanding :
Q: Write a program that allows you to play rock,paper, scissors against the computer. When first run…
A: #include <iostream>#include <stdio.h>#include <stdlib.h>#include <ctime>…
Q: Write a program that takes your full name as input and displays the abbreviations of the first and…
A: Note: Programming Language not specified using C++ to implement code: //include the necessary…
Q: Write a program that reads 6 integers and displays the largest and the smallest amongst those…
A: C++ code: To displays the largest and the smallest amongst 6 integers #include <iostream>using…
Q: Write a program that prints student's name and grade point average in 6 subjects a
A: C++ programming language has been used. C++ code is as follows: #include<iostream>using…
Q: Write a program that displays, ten per line, all the leap years in the twenty-first century (from…
A: Approaches: Define a main category. within the most category outline a main perform.Inside the most…
Q: Write a program that creates a login name for a user, given the user's first name, last name, and a…
A:
Q: Write a program that displays all the numbers from 1 to 500, 5 per line, that are divisible by 3 and…
A: A program that displays all the numbers from 1 to 500, 5 per line, that are divisible by 3 and 4.…
Q: Write a program that asks users when their birthday is. Use information provided to give them their…
A: Your solution is here with an output.
Q: Write a program that reads the 10 student grades () from keyboard and calculates the class average.
A: Code in python programming language #Program to read grades of 10 students from teh keyboard and…
Q: Write a program that asks the user to enter two positive integers, the height and length of a…
A: According to the asked question, the solution is given below with a proper explanation.
Q: Write a program that displays a table of speeds in kilometers per hour with their values converted…
A: PROGRAM CODE: #include <iostream>#include <iomanip>using namespace std; int main(){ int…
Q: Write a program that prints out the name of my favourite dinosaur, Tyrannosaurus Rex: Tyrannosaurus…
A: As given, I need to write a Python program that prints the name of a dinosaur, Tyrannosaurus Rex. I…
Q: Write a program that displays all the numbers from 300 to 400, 5 per line, that are divisible by 3…
A: Since the programming language is not mentioned, so we'll do it in java. The programming methodology…
C++
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images
- Write a program which displays a square matrix of sequential numbers with the capital X’s shown on the diagonals. Start the programby entering the size of the matrix, which is the number of rows, columns in the matrix. Consecutive integers are placed in the matrixas shown by the examples below. However, the numbers are replaced by an X if the number would be located on one of the twodiagonals of the matrix. Please write the program as easy to understand since this class is CS Awrite a program that displays, in ascending order,the first names of those students who have attended more than one day of the course.If there are students with the same first name, display their first and last names.Program41.javaWrite a program that prompts the user to enter a full name consisting of three names (first middle last) into one String variable. Then use methods of class String to: print the number of characters in the full name, excluding spaces print just the middle name and the number of characters in it. print the three initials of the name print the last name in all lower case. print the full name in the usual alphabetical format (Last, First Middle) and proper case.
- Write a program that reads students’ names followed by their test scores. The program should output each student’s name followed by the test scores and the relevant grade. It should also find and print the highest test score and the name of the students having the highest test score. Student data should be stored in a struct variable of type studentType, which has four components: studentFName and studentLName of type string, testScore of type int (testScore is between 0 and 100), and grade of type char. Suppose that the class has 20 students. Use an array of 20 components of type studentType. Your program must contain at least the following functions: A function to read the students’ data into the array. A function to assign the relevant grade to each student. A function to find the highest test score. A function to print the names of the students having the highest test score. Your program must output each student’s name in this form: last name followed by a comma, followed by a…Write a program that reads students’ names followed by their test scores. The program should output each student’s name followed by the test scores and the relevant grade. It should also find and print the highest test score and the name of the students having the highest test score. Student data should be stored in a struct variable of type studentType, which has four components: studentFName and studentLName of type string, testScore of type int (testScore is between 0 and 100), and grade of type char. Suppose that the class has 20 students. Use an array of 20 components of type studentType. Your program must contain at least the following functions: A function to read the students’ data into the array. A function to assign the relevant grade to each student. A function to find the highest test score. A function to print the names of the students having the highest test score. Your program must output each student’s name in this form: last name followed by a comma, followed by a…the program below is the program that is being referred to in the image, using namespace std; struct varis { string lastName, firstName; int hours, rate; double pay; int major_type[2]; }; void print_Title(); string readName(); int readHours(); int readPayRate(); int readMajor(); double computeAmount(int myMajor, double myPay); void printRecord(varis info[], int size); int main() { print_Title(); int size = 10; int x = 0; varis info[size]; do { cout << "\nEnter first name, last name, numbers of hours worked, and hourly pay\n"; info[x].firstName = readName(); info[x].lastName = readName(); info[x].hours = readHours(); info[x].rate = readPayRate(); info[x].pay = info[x].hours * info[x].rate; cout << "Type 1 if you are a Computer Science major or a 0 if you are not: "; info[x].major_type[0] = readMajor(); cout << "Type 1 if you are a Cyber Security…
- Write a program to extend the below program by adding an option 'g' to the menu program. If this option is chosen, the program gets a string from the user (up to a maximum of 50 characters) and swaps the first and last characters. Main.java import java.util.Scanner; public class Main { static Scanner kb = new Scanner(System.in); public static void displayMenu() { System.out.println("a-Print Name and Tutor Name"); System.out.println("b-Largest of 3 Number"); System.out.println("c-Display Numbers in range of two numbers"); System.out.println("d-Check for Triangles"); System.out.println("e-Check for prime"); System.out.println("f-Arrays Example"); //adding statement System.out.println("q-Quit"); System.out.print("Enter Your Choice (a,b,c,d,e,f,q) : "); } public static void findLargestOf3() { double x, y, z, smallest, largest; System.out.println("Enter 3 Numbers : "); System.out.print("x : "); x = Double.parseDouble(kb.nextLine()); System.out.print("y : "); y =…I have a running code of a dining philosophers problem but it has a logic problem where it loops right after it asks how many of the philosophers are hungry thus unable to calculate how exactly the philosophers are going to eat below is the code: #include <stdio.h>#include <stdlib.h>#include <conio.h>#include <math.h>#include <string.h> void one(void);void two(void);void exit();int tph, philname[20], howhung, hu[20], cho;//{}[] int main(void){ int i, status[10],philname[10],howhung; printf("\n\nDINING PHILOSOPHER PROBLEM"); printf("\nEnter the total no. of philosophers: "); scanf("%d",&i); for(i=0;i<tph;i++) { philname[i] = (i+1); status[i]=1; } printf("How many are hungry : "); scanf("%d", &howhung); if(howhung==tph) { printf("\nAll are hungry..\nDead lock stage will occur"); printf("\nExiting.."); } else {…. Many companies use telephone numbers like 555-GET-FOOD so the number is easier for their customers to remember. On a standard telephone, the alphabetic letters are mapped to numbers in the following fashion: A, B and C = 2 D, E and F = 3 G, H and I = 4 J, K and L = 5 M, N and O = 6 P, Q, R and S = 7 T, U and V = 8 W, X, Y and Z = 9 Write a program that asks the user to enter a 10-character number in the format XXX-XXX-XXXX. The application should display the telephone number with any alphabetic characters that appeared in the original translated to their numeric equivalent. For example, if the user enters 555-GET-FOOD, the application should display 555-438-3663. After displaying the translated telephone number, ask the user if they’d like to enter another number. If the user enters “y”, run the program again. If not, terminate the program. (10 points)Note: the sentence the program reads SHOULD NOT be hardcoded. Allow the user to enter the sentence the program reads PYTHON
- Write a program that displays a table of pounds and equivalent weights in kilograms. You can find the conversion factor online if necessary. Store this factor in a properly named constant. Allow the user to specify the range of pounds for the table by prompting for the start, stop, and step values for the pounds column. Display the pounds accurate to two decimal places centered in a column 10 characters wide. The kilometers should display accurate to three decimal places and right-aligned in a column 12 characters wide (see page 75-78). Column headings should be displayed with the same alignments. See Sample Output.Program41.javaWrite a program that prompts the user to enter a full name consisting of three names (first middle last) into one String variable. Then use methods of class String to: print the number of characters in the full name, excluding spaces print just the middle name and the number of characters in it. print the three initials of the name print the last name in all lower case. print the full name in the usual alphabetical format (Last, First Middle) and proper case. Program51.java Write a program that uses a while loop to generate 49 random integers, all from 20 to 49, inclusive. The same loop should print the integers in seven rows and right-aligned in columns seven characters wide. The program should report both the count and the total of integers in the 20s, 30s, and 40s. See Sample Output.Sample Output Program52.java Write a program that prompts the user for a binary number (from 3 to 8 bits) as a String and converts it to base-10 decimal value. There are several ways to…Create a program which will read a phrase from the user and create a framed version of it for printing. For example, the phrase "hello world"would result in: ********* * hello * * world * ********* Whereas the phrase "the sky is falling"might be: *********** * the * * sky * * is * * falling * *********** Or: *********** * the * * sky * * is * * falling * *********** Or even: *********** * the * * sky * * is * * falling * *********** Depending on whether or not the user asked for left, centered, or right justification — respectively — of the phrase's words within the frame. Note how the frame exactly fits the phrase based on the longest word within. Neat, eh? The phrase "O | -+- | /-\"when centered would become: ******* * O * * | * * -+- * * | * * /-\ * ******* (Okay, so it's a sad excuse for a stick figure, but hey! I've never claimed to be a great good decent artist, now…