Write a program that allows you to input multiple names and corresponding heights (assumed to be in inches). After the user has indicated that all names have been input, display the name of the tallest individual and their height.
Sample run:
"Name ?"
James
"Height?"
50
"Continue?"
True
"Name?"
Sarah
"Height?"
60
"Continue?"
False
"Sarah is the tallest at 60 inches"
//Program written in C++
#include <iostream>
using namespace std;
int main() {
string str="True"; //User choice either want to continue or not
int tallest_height=0; //store tallest person height
string tallest_person="";//store tallest person name
do{
string name;
int height;
cout<<"Name ?"<<endl;
cin>>name;
cout<<"Height ?"<<endl;
cin>>height;
if(height>tallest_height) //compare height to tallest person
{
tallest_height=height;
tallest_person=name;
}
cout<<"Coninue ?"<<endl; // continue or not .here we have to enter only one of two option {True,False}
cin>>str;
}while(str=="True");
cout<<tallest_person<<" is the tallest at "<<tallest_height<<" inches"<<endl;
return 0;
}
//Output:

Write a program that allows you to input multiple names and corresponding heights (assumed to be...
NOTE: Use JOptionPane NOT Scanner Please Write an application that allows a user to enter the names and birthdates of up to 10 friends. Continue to prompt the user for names and birthdates until the user enters the sentinel value ZZZ for a name or has entered 10 names, whichever comes first. When the user is finished entering names, produce a count of how many names were entered, and then display the names. In a loop, continuously ask the user...
In Java.
Write a GUI contact list application. The program should allow you to input names and phone numbers. You should also be able to input a name and have it display the previously entered phone number. The GUI should look something like the following, although you are welcome to format it in any way that works. This should be a GUI application with a JFrame. The program should contain two arrays of Strings. One array will contain a list...
Write in C++ Name sort Write a program that allows you to input up to 20 names and sorts these names into alphabetic order and outputs them. Write in C++
write a ContactBook in C++ ContactBook that holds 10 names with that names corresponding contact (last name and first name of the owner). Ask the user to input up to 10 Contacts (It may be less. The user should have the ability to stop inputting Contacts whenever he wishes). 3.This class will store a list of Contacts in a stack allocated array of default capacity 10. 4.You must be able to add new contacts to a list, delete old contacts,...
in Python: Write a program that allows the user to enter a number between 1-5 and returns an animal fact based on what the user entered. The program should 1. Continue to run until the user enters “quit” to terminate the program, and 2. Validate the user’s input (the only acceptable input is 1, 2, 3, 4, 5 or “quit”). You can use the following animal facts: An octopus is a highly intelligent invertebrate and a master of disguise. Elephants...
Write a C++ console application that allows your user to capture rainfall statistics. Your program should contain an array of 12 doubles for the rainfall values as well as a parallel array containing the names of the months. Using each of the month names, prompt your user for the total rainfall for that month. The program should validate user input by guarding against rainfall values that are less than zero. After all 12 entries have been made, the program should...
Write a program that has an array of at most 50 strings that hold people’s names and phone numbers. You can assume each string’s length is no more than 40. You may make up your own strings, or use the following: "Becky Warren, 555-1223" "Joe Looney, 555-0097" "Geri Palmer, 555-8787" "Lynn Presnell, 555-1212" "Holly Gaddis, 555-8878" "Sam Wiggins, 555-0998" "Bob Kain, 555-8712" "Tim Haynes, 555-7676" "Warren Gaddis, 555-9037" "Jean James, 555-4939" "Ron Palmer, 555-2783" The program should ask the user...
This code should be written in php. Write a program that allows the user to input a student's last name, along with that student's grades in English, History, Math, Science, and Geography. When the user submits this information, store it in an associative array, like this: Smith=61 67 75 80 72 where the key is the student's last name, and the grades are combined into a single space-delimited string. Return the user back to the data entry screen, to allow...
Can you help me to write a Java code for this:
The program must satisfy the following
requirements:
The program should ask the user the following information
The site names for 6 locations (into
an array)
The cash donation for 6 locations
(into an array)
The food donations in pounds for 6
locations (into an array)
Is there another test they want to
process, meaning do they want to run the program again?
Based on the input, the program will...
Using c++ Write a program that reads in a list of up to 25 first names from an input file nameData.txt and allows the user to display the name data, sort it in ascending or descending order, count the number of occurrences of a given name, or exit the program. The input file consists of a single names per line with each line terminated with an end of line (i.e. using Enter key to end the line). Your program should...