The user will input a Philippine amount, then the said amount will be converted to different currencies namely: US Dollar, Euro, Yuan, Koruna, Krone, Sheqel and Dinar Sample run: Enter Philippine peso: 43.33089
Q: String Val1 = "1234"; 4321; Int Val2 String Val3; Val3 Val1 + Val2;
A: In the above codes, val1 is a string type variable and val2 is an int type variable. Although val3…
Q: Examine the code below. Which if statement below will execute? mouseX = 250; mouseY = 50; f(mouseX…
A: Solution :
Q: Ask the user for a name and for a list of test scores. Show the number of tests taken and the…
A: import java.util.ArrayList;import java.util.List;import java.util.Scanner;public class Main {…
Q: Which value can be entered to cause the following code segment to display the message: That number…
A: Objective: According to the given question, the correct input from a set of inputs needs to be…
Q: Output The first line will contain a message prompt to input the random number being sent. The…
A: Java: Java is a high level object oriented programming language. Java is platform independent.…
Q: Input year and month. The year should be range o positive integer and the month should be integer…
A: steps: 1. create a function to check if the number is a leap year or not 2. create a list of months…
Q: Q2) Draw a flowchart to print all the prime numbers between LOW (1) and HIGH (200).
A: first lets see the pseudo do to solve this problem: low =1 //setting low to 1 high=200 //setting…
Q: The program prints the user's identifier (which could be an email address, a phone number, or a…
A: Below I have provided the java code of the given program. Also, I have attached the output of the…
Q: Variable n is an integer variable. Which if statement checks if the variable n contains a number…
A: Answer is option b b. if (n % 10 == 7)
Q: Please input the two times, one is the time for train leaving the station, another is the time for…
A: The program is written in Java. Check the program screenshot for the correct indentation. Please…
Q: Prompt the user to enter a value for dollars, which must not be greater than 150 If the entry is 80…
A: Python Program :
Q: A mail order house sells five different products whose retail prices are as follows: * product 1:…
A: Logic: Use while loop to check the user inputs -1 for productNumber. Repeated accept e product…
Q: Assume that the variable x is a double value. Which code keeps only 3 digits after the decimal point…
A: Given Assume that the variable x is a double value. Which code keeps only 3 digits after the decimal…
Q: inte a program that asks the user to input a whole number. Then, tell each place Feach digit. For…
A: Program Approach: 1- Prompt a message and take the input from a user.2- Declare an integer…
Q: Find and correct the errors in the following code segment that computes and displays the average:…
A: Given program consists of two integers x and y. To find the average of these two numbers (x+y)/2 is…
Q: Calculator: Initially asks for two numbers. Afterwards, ask the user to select the operator and…
A: def Compute(x,y,op): x=int(x) y=int(y) if op=="+": return x+y if op=="-":…
Q: QJ Write a program to calculate the amount of three equations according to the amount of z. Where,…
A: Actually, python is a easiest programming language. It is a dynamically typed programming language.…
Q: Using Switch case: Write a program that asks the user to input a number from 1 to 3000. Then, print…
A: C++ is the general purpose of the programming languages can be used to develop the high level of…
Q: Problem: Read your name and one numeric value [Omani Rial], print the following menu as shown in…
A: Algorithm- Take input of name, value in Omani rials. Then take input of choice and use switch case…
Q: N1, N2 and Nn print the largest number of them for example
A: a flowchart to read N numbers: N1, N2 and Nn print the largest number of them for example
Q: (LMC) Ask the user to input two numbers. If the first number is greater than the second, output 1;…
A: LMC = Little Man Computer. It is a model of computer which is used to teach students about…
Q: repeat 5 times enter the salesperson's name and sales amounts calculate the bonus by…
A: Q: Code the given problem
Q: stock_prices = input().split() for stock_prices = [34.62, 76.30, 85.05] for price in stock_price:…
A: In the given snippet of the program, first, you are taking input from the user in a stock_prices…
Q: Write the program that will ask the user to enter a positive integer, then determine and show the…
A: Program is in C language to show number of digit in that integer :- #include <stdio.h>int…
Q: You sell regular coffee at 10 rs/bag, cappuccino coffee at 13 rs/bag, and mocha coffee for 15rs/bag.…
A: Note: Here you didn't mention any programming language so we are creating the program in the C++…
Q: Drow ER diegram please
A: ER diagram is the graphical representation of the relationship between an entity and its attributes.…
Q: Prompt the user to enter a value for yards, which must be greater than 0 and not greater than 10 For…
A: Solution :
Q: Variable n contains a positive integer value. Which if statement checks if the variable n has 2…
A: In decimal number system(base-10) first 2 digits number is 10 and last 2 digits number is 99. So to…
Q: Read your name and one numeric value [Omani Rial), print the following menu as shown in below…
A: As there is no programming language mentioned program is attempted in python user has to input name…
Q: Prompts the user for 4 one-word items and their corresponding prices in US dollars Compute the total…
A: Step 1: Start Step 2: Declare the local variables that will be used to store the Item Names and…
Q: Q2/ Draw the flowchart required to find the sum of odd numbers among 30 numbers entered by the user.
A: Input in the flowchart : A list of 30 numbers from the keyboard one by one Output of flowchart :…
Q: Question 1 Prompt the user to enter a string and then check if the string contains two consecutive…
A: We have to take input a string from the user and check whether the string contains two consecutive…
Q: Variable n is an integer variable. Which if statement checks if the variable n contains a 4-digits…
A: The given problems are related to programming logics where first problem is related to IF…
Q: Please enter starting number: -2 Please enter ending number: 2 Negative values are not accepted.…
A: import java.io.*;import java.util.*; public class Main { public static void main(String[] args) {…
Q: An integer is taken input from user and you have to find whether the integer is Palindrome or not.…
A: Task :- Write a C++ code to identify if entered integer is palindrome or not. C++ program :-…
Q: Prompt the user to enter the principal amount(p), the annual rate of interest in percentage(r), and…
A: Start Take the input values. Read P,R,T Compute Simple intrest. Print simple intrest. Stop
Q: date June 10, 1960 is special because when we write it in the following format, the month times the…
A: #include <iostream> int main() { int d; int m; int y; std::cin >> d;…
Q: An online sales company sells a ceratin item for $49.99. Quantity discounts are given according to…
A: As there is no programming language is mentioned in the question, So I will solve this question…
Q: number of the day. (For example, when the user enters 2 the VB print Monday)
A: Python used to answer this question
Q: 2.1 Prompt the user to enter an integer n from the user and print if that number is zero, positive…
A: Since programming language is not mentioned so I have used C++ programming language. Requirement:…
Q: What is the outcome of the following code segment: VAR num AS Integer = 5 VAR other AS Integer = 9…
A: The integer variable "num" is initialized with the value "5". The integer variable "other" is…
Q: You are provided with 3 numbers : input1, input2 and input3. Each of these are four digit numbers…
A: Python program for above : #get 3 numbers input1 = input() input2 = input() input3 = input()…
Q: Generate any random number between 1 and 10 by using Random Function then guess that number in…
A: As no programming language is mention. So i am using python to code.
Q: Prompt the user to enter the principal amount(p), the annual rate of interest in percentage(r).…
A: As you have not mentioned the language to solve I tried it in java and here is the answer. import…
Q: 5. The user will input a Philippine amount, then the said amount will be converted to different…
A: Note: As per our guidelines we are supposed to answer only one question. Kindly repost other…
Q: This code read a set of temperatures T(50), determine an average, and then calculate the deviation…
A: Answer is Option-3 i.e., 1-s=s+T(I) 2-Blank 3-A=s/50 4-For I = 1 To 50 5-Blank 6-D(I)=T(I)-A.
Q: Supply the codes so that numbers will display starting with s and ending with e. Assume that the…
A: code snippet:
Q: Prompt the user to enter in the three number that define a quadratic ??2+??+?=0ax2+bx+c=0, that is…
A: As there is no programming language mentioned in the question so program is attempted i python…
Please provide a screenshot of the output and attache the C language program used.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- Q: Write a program which reads two integer values. If the first is less than the second, print the message up. If the second is less than the first, print the message down If the numbers are equal, print the message equal. (Visual Basic)1. a)What is the value of num when the following code snippet runs successfully? int num = 100; if (num < 100) { if (num < 50) { num -= 5; } else { num -= 10; } } else { if (num > 150) { num += 5; } else { num += 10; } }The factorial of n is the product of all the nonnegative integers from 1 to n. for 8! = 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 = 40, 320 Write a program that prompts the user to input a nonnegative integer (if yc negative integer, the program should prompt you to re-enter until you nonnegative integer) and calculate the factorial of that number. Your result should look like below: Enter a nonnegative integer: 8 The factorial of 8 is 40320.using java
- Write a program that converts U.S. dollars to Canadian dollars, German marks, and British pounds, as shown in Figure 36.18. The user enters the U.S. dollar amount and the conversion rate, and clicks the Convert button to display the converted amount.a. Write a program named CheckMonth that prompts a user to enter a birth month. If the value entered is greater than 12 or less than 1, display an error message; otherwise, display the valid month with a message such as 3 is a valid month. b. Write a program named CheckM0nth2 that prompts a user to enter a birth month and day. Display an error message if the month is invalid (not I through 12) or the day is invalid for the month (for example, not between 1 and 31 for January or between I and 29 for February). If the month and day are valid, display them with a message.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; }
- The cost of renting a room at a hotel is, say $100.00 per night. For special occasions, such as a wedding or conference, the hotel offers a special discount as follows: If the number of rooms booked at least 10, the discount is 10%; at least 20, the discount is 20%; and at least 30, the discount is 30%. Also if rooms are booked for at least three days, then there is an additional 5% discount. Write a program that prompts the user to enter the cost of renting one room, the number of rooms booked, the number of days the rooms are booked, and the sales tax (as a percent). The program outputs the cost of renting one room, the discount on each room as a percent, the number of rooms booked, the number of days the rooms are booked, the total cost of the rooms, the sales tax, and the total billing amount. Your program must use appropriate named constants to store special values such as various discounts.Write a program named Admission for a colleges admissions office. The user enters a numeric high school grade point average (for example, 3.2) and an admission test score. Display the message Accept if the student meets either of the following requirements: A grade point average of 3.0 or higher, and an admission test score of at least 60 A grade point average of less than 3.0, and an admission test score of at least 80 If the student does not meet either of the qualification criteria, display Reject.If you know the balance and the annualpercentage interest rate, you can compute the interest on the next monthly paymentusing the following formula:interest = balance X (annualInterestRate/1200)Write a program that reads the balance and the annual percentage interest rate anddisplays the interest for the next month. Here is a sample run: Enter balance and interest rate (e.g., 3 for 3%): 1000 3.5 ↵EnterThe interest is 2.91667
- In Python Code on Visual Code. The Coffee vending machine provides coffee in three sizes: small (9oz), medium (12oz), and large (15oz).Write a program to determine the drink size based on the letter the user enters. Print a message to the user giving the various drink size options and then prompt the user for the drink size. The user can enter an ‘s’ or‘S’ for small, an ‘m’ or ‘M’ for medium, and an ‘l’ or ‘L’ for large. Depending on which size the user requests, print a message such as: “You have ordered a (small, medium, large) drink.” In addition to displaying the size ordered, also record a price multiplier. The price multiplier for a small is 1, for a medium is 2, and for a large is3. If the user does not enter a valid character, print an error message (such as “Error: Invalid drink size”) and exit the program. You should use if-then-else statements for this problem. After the if-then-else statements, print the value of the price multiplier to ensure that the correct value was…Write a program that prompts the user to enter 10 integers, and normalizes the integers to be in the range of 0 to 1 by dividing every integer with the largest integer. Display the 10 normalized real-valued numbers.The great circle distance is the distance betweentwo points on the surface of a sphere. Let (x1, y1) and (x2, y2) be the geographicallatitude and longitude of two points. The great circle distance between the twopoints can be computed using the following formula:d = radius X arccos(sin (x1) X sin(x2) + cos(x1) X cos(x2) X cos(y1 - y2))Write a program that prompts the user to enter the latitude and longitude of twopoints on the earth in degrees and displays its great circle distance. The averageradius of the earth is 6,371.01 km. Note you need to convert the degrees into radiansusing the Math.toRadians method since the Java trigonometric methods useradians. The latitude and longitude degrees in the formula are for north and west.Use negative to indicate south and east degrees. Here is a sample run: Enter point 1 (latitude and longitude) in degrees: 39.55 −116.25 ↵EnterEnter point 2 (latitude and longitude) in degrees: 41.5 87.37 ↵EnterThe distance between the two points is…