Write a MATLAB script that works like following
Program |
User replies (for instance) |
Hi |
Hi |
What’s your name? |
John Smith |
What year were you born? |
1995 |
Does that mean you are 20? |
Yes |
What’s your favorite team? |
Blues |
Good luck to your Blues. Buy. |
Buy. Have a nice day. |
hi = input("Hi ", 's');
name = input("What’s your name? ", 's');
year = input("What year were you born? ");
fprintf("Does that mean you are %d?", 2018 - year);
yes = input(" ", 's');
fav = input("What’s your favorite team? ", 's');
fprintf("Good luck to your %s. ", fav);
buy = input("Buy.\n", 's');
%{
SAMPLE
OUTPUT
Hi Hi
What’s your name? Sindhu Vegi
What year were you born? 1994
Does that mean you are 24? Yes
What’s your favorite team? Blues
Good luck to your Blues. Buy.
Buy! Have a nice Day!
}%
Write a MATLAB script that works like following Program User replies (for instance) Hi Hi What’s...
1) Write a MATLAB script to prompt a user to input two numbers, then assess whether the two numbers are equal or not. If the two numbers are equal, display that they are equal in the Command Window. If they are not equal, display that they are not equal in the Command Window. 2) Write a MATLAB script that prompts the user to enter the day of the week using the input function. If the information the user enters is...
Write a Bash script called hello that uses command line arguments to allow the user to put two strings after the command name, when the script is being executed. These strings should represent a first and last name. The script should then write out a greeting to the user that includes the first and last name. Here is an example of how the script might work (the first line represents what the user types to launch the script): [user@HAL] hello...
Write a Java program for a fortune teller. The program should begin by asking the user to enter their name. Following that the program will display a greeting. Next, the program will ask the user to enter the month (a number 1-12) and day of the month (a number 1-13) they were born. Following that the program will display their zodiac sign. Next, the program will ask the user their favorites color (the only choices should be: red, green and...
Modular program mathlab: Write a program in Matlab that would continuously ask the user for an input between 1 and 6, which would represent the result of rolling a die. The program would then generate a random integer between 1 and 6 and compare its value to the value entered by user. If the user’s die is larger, it should display, “You got it” If the user’s die is smaller, it should display, “Nice try” If the results are the...
THE PROBLEM:It makes it easier if you use switch statements for some part of the homework. Write a program that inputs a month, day, and year from the user and outputs the corresponding date in the following two standard date formats:6/12/2005 June 12,2005Also your program must print the name of any holiday associated with the date.For example:3/17/2010 March 17, 2010 St. Patrick's Day Your program should ask the user how many times the user wants to run the code and then...
Project 1, Program Design 1. Write a C program replace.c that asks the user to enter a three-digit integer and then replace each digit by the sum of that digit plus 6 modulus 10. If the integer entered is less than 100 or greater than 999, output an error message and abort the program. A sample input/output: Enter a three-digit number: 928 Output: 584 2. Write a C program convert.c that displays menus for converting length and calculates the result....
Code is in C# Your instructor would like to thank to Marty Stepp and Hélène Martin at the University of Washington, Seattle, who originally wrote this assignment (for their CSE 142, in Java) This program focuses on classes and objects. Turn in two files named Birthday.cs and Date.cs. You will also need the support file Date.dll; it is contained in the starter project for this assignment. The assignment has two parts: a client program that uses Date objects, and a...
Comprehensive Problem 6-52 (LO 6-1, LO 6-2, LO 6-3) [The following information applies to the questions displayed below.] Read the following letter and help Shady Slim with his tax situation. Please assume that his gross income is $172,900 (which consists only of salary) for purposes of this problem. December 31, 2019 To the friendly student tax preparer: Hi, it’s Shady Slim again. I just got back from my 55th birthday party, and I’m told that you need some more information...
i have the case study question with the answers but i need help to re-write the answers. please see the attached files Case Study Analysis (CSF3003) Assessment Description and Requirements CLO1: Case Study 1 Ahmad lef home to study master and PhD in Australia. He has fees for the first semester only. After he arrived to Sydney and settled down, he start looking for a part-time job to save money for the next term. Ahmad has some experience on making...