1. Reverse a number (integer) by iterative program. Reverse a number: Input: prompt user to enter an integer. Output: print out the integer reversely. e.g.: if user enters 12345, your output will be 54321.
Q: Celsius to Fahrenheit: Write a program that converts Celsius temperatures to Fahrenheit…
A: Step 1:- Program Approach:- (i)Include two header file (ii) iomanip header file is used for fixed()…
Q: Fibonacci sequence: The first two numbers of the fibonacci sequence are 1 and 1, and sequential…
A: Since you have not specified programming language, I have written program in Python programming…
Q: Exercise 2: Count the Numbers Write a program that prompts the user to enter a number n. Then, it…
A: n = int(input("Enter the value of n: ") )x=0y=0z=0while True: k=int(input("Enter a number, -999…
Q: Write a program that plays a guessing game with the user. The program should have the right answer…
A: Please find the answer below :
Q: Q2: using java please type this code Code Problem 2 Book Sales Barnes and Nobles sells a package…
A:
Q: Miles to track laps One lap around a standard high-school running track is exactly 0.25 miles. Write…
A: Actually, program is an executable software that runs on a computer.
Q: Write a program that can calculate the future and present value of an investment given various…
A: The objective of the question is to write a program that calculates the future and present value of…
Q: Write a single program that: Asks the user to enter two integer numbers (except 0). The program…
A: Write a single program that asks the user to enter two integer numbers and determines the following…
Q: The factorial of n is the product of all the nonnegative integers from 1 to n. for 8! = 1 * 2 * 3 *…
A: Given: The factorial of n is the product of all the nonnegative integers from 1 to n. for 8! = 1 * 2…
Q: Write a complete program that: 1. Prompts the user to enter an integer and reads in an integer…
A: Details of the program:- The program is given in C++ language. We have declared the variables first…
Q: Write an algorithm that gets student exam scores from the user. Each exam score will be an integer…
A: Given: We have to write an algorithm that gets student exam scores from the user. Each exam score…
Q: Question 1 Write a program which takes the input from the user of time and distance and calculate…
A: here in this question we have asked to write a program which take input from the user of time and…
Q: Write aC++program that allows a user to enter their rating of the three movies in the DarkKnight…
A: [Note: Explanation of the program code is provided within the comments.] Program code:…
Q: 1. Write a program that prompts the user to enter an integer between 0 and 6 and prints thie day…
A: I give both codes in C along with output and code screenshots.
Q: Python Coding- Except ValueError Using Except ValueError, change the program so that if the user…
A: The modified python code and approach are given below: - Approach: - Importing the essential…
Q: 1) Simple Calculator: In Python, implement a simple calculator that does the following operations:…
A: Start:Initialize a loop to keep the calculator running until the user chooses to exit.Input:Ask the…
Q: 1. Write a an algorithm that asks the user to input a positive integer n and counts how many of the…
A: The algorithm is a step-by-step program instruction in a human-readable format. The number of steps…
Q: PROBLEM: Write a program for a "6/15 Lottery Game". Please take note of the following: 1. It must…
A: Since no programming language is mentioned, I am using python. Code: import randomimport sys # Seed…
Q: a program which repeatedly reads positive numbers until the user enters -1. Once -1 is entered,…
A: It is defined as a powerful general-purpose programming language. It can be used to develop software…
Q: 3.Professor Mysterious uses a apecial tormula to calculate the students. Write a program that…
A: I'm writing Python code for this question:
Q: 2) Write pseudocode that performs the following: Ask a user to enter a number. If the number is…
A: Declare Number as integer Accept Number from user if number >=0 and number <=10 then print…
Q: Running the program Your program should take 5 arguments: start annual years return inflation where…
A: The objective of the question is to calculate the future and present value of an investment given…
Q: Excercise 30 defines the number e and exerecise 31 shows how to approximate the value of e using a…
A: Since no programming language is mentioned. I am attempting this in python. if you need it in any…
Q: 888 by CodeChum Admin This one is a bit tricky. You're going to have to isolate each digit of the…
A: Given: Input: 3-digit integer. Output: print the largest of 3 digits.
Q: rite a program which calculates and prints the monthly pa lary is calculated after the following…
A: I have written code for this question below:
Q: 1. Write a program that lets the user guess whether a randomly generated integer would be even or…
A: Algorithm / steps : Generate the random number Ask the user guess for even or odd Incase…
Q: Write a program that determine the age based on code as input. A: Veteran (age above 50) B: Adult…
A: As the language of code is not specified. So, I had answered this question in Java language. Hope…
Q: Running the program Your program should take 5 arguments: start annual years return inflation where…
A: The objective of the question is to calculate the future and present value of an investment given…
Q: Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go north/south,…
A: - We need to code for the auxiliary and primary highways according to the number conditions.
Q: enter the total square feet in a tract of land and calculates the number of acres in the tract.…
A: C++ used to answer this question
Q: • Write a python program to accept 2 numbers, if two numbers are same calculate Z=a2+b2, to of two…
A: As per guidelines we are supposed to answer only one question. Kindly repost other questions as a…
Q: The Lottery Problem: • The lottery draws a number that is the winning number • The…
A: ANSWER: LotteryProblem.vb: Module VBModuleSub Main()'This is for lottery number between 0 and 999…
Q: /* This program should play a game with the user asking her to guess a target number (randomly…
A: As no programming language is mentioned, it is solved using Java
Q: ert feet into meters: Write a program which reads the number in feet, converts it to meters, and…
A: Code: #include <iostream>using namespace std;int main(){ float feet, meters,inches;…
Q: Extend to cast the double to an integer, and output that integer. Enter integer: 99 Enter double:…
A: Program import java.util.Scanner;public class BasicInput { public static void main(String[] args)…
Q: Write a program that randomly generates a lottery between 100 and 999 (random.randint(100, 999)),…
A: I have provided PYTHON CODE along with CODE SCREENSHOT and 2 OUTPUT…
Q: Write a guessing game program: - The program has to first generate a random number in range 1 -…
A: According to the information given:- We have to follow the instructions in order to get the desired…
Q: Write a Program in R that asks the user to enter two numbers then perform 5 mathematical operations…
A: Here, I have to provide an R solution to the above question.
Q: Python please: Three fictional companies have the following value per stock share: Gaggle: $212.41…
A: print("The value per stock share of three companies are: ") # display statements…
Q: Q1. FizzBuzz problem:- Write a program which return "fizz" if the number is a multiplier of 3,…
A: The FizzBuzz problem is a classic programming task, often used in coding interviews. It tests your…
Q: Question #2 ::: Write a cpp program to add two numbers; defined (num1, num2). If the number addition…
A: Given:
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images
- Enter a Character: A It's a Letter Vowel Try again [y/n]: y Enter a Character: y It's a Letter Consonant Try again [y/n]: y Enter a Character: 6 It's a Number Even Try again[y/n]: y Enter a Character: * It's a Special Character Try again [y/n]: n Programmed by:Part 4 Guessing game (random and absolute) Write a program that does this: You (as programmer) are the dealer. Pick a random number for yourself (between 0 and 100). Ask the user to input a random number (between 0 and 100). Whoever is closer to 21 wins the game. If the dealer wins, say "Dealer wins." If the user wins, say “Player wins”. Example output: Player please pick a number. 45 Dealer has 25 Dealer wins. Part 5 Guessing game loop (keeping a counter) Write the same program as in part 4, but keep it going so that it keeps playing (dealing hands and saying who wins) until the User enters the number 21 at which point you print out some stats and say goodbye, for example, your goodbye might look like this: Number of hands played: 5 Dealer won: 3 Player won: 2 You're 2 for 5 Come back to thePRG6: Write a program that will accept a number as input then determines if the number is odd or even. PRG7: Write a program that accepts 3 integers and determines the highest and the lowest of these integers. PRG8: Write a program that will determine if a triangle is valid. The program shall accept three angles as input then remarks if the triangle is valid or not. PRG9:Write a program that will determine a student's grade based on four major exams. The flowchart should compute for the average of four major exams and identify his grade based on his average. Use the following criteria: Average Grade Remarks 99-100 A+ Excellent 96-98 A- Very Good 93-95 B+ Very Good 90-92 В- Good 87-89 С+ Good 84-86 C- Fair 81-83 D+ Fair 78-80 D- Passed 75-77 E Conditional Below 75 F Failed
- -Prompts the user to enter an integer x. Assume without error checking the user enters a positive integer. -The program then will print all the odd integers between 1 and x that are a multiple of 3. Sample: Enter an integer x: 15 3 is a multiple of 3 9 is a multiple of 3 15 is a multiple of 3Write a pseudo code in which you ask the user to will enter a number and then enter 5 more numbers using the while statement to do this and in the end your program will show how much number were divisor by the number you enter at start. Also the program should terminate if the users enters a negative value at any stage. Enter a Number: 2Enter 1 Number: 4Enter 2 Number: 5Enter 3 Number: 6Enter 4 Number: 7Enter 5 Number: 8Total divisor are: 3The value for T can be determined by the series equation: 1 1 1 1 1 1 TT = 4 X - 5 7 11 13 Write a program that prompts the user to enter the number of iterations to be executed to determine the value of T.
- Body mass index (BMI) is a measure of health based on weight. It can be calculated by taking your weight in kilograms and dividing it by the square of your height in meters. Write a program that prompts the user to enter a weight in pounds and height in inches and displays the BMI. Note that one pound is 0.45359237 kilograms and one inch is 0.0254 meters.Warm-up: Integer Operations Write a program that asks the user to enter two integers and prints the Difference, Product, Area of an Ellipse, and Average of these numbers. Here is an example of the execution of the program:1- If money is left in a particular bank for more than 5 years, the bank pays interest at a rate of 4.5% of the money; otherwise, the interest rate is 3.0% of the money. Write a program to accept the number of years in the variable numYears and money in the variable money then display the correct interest rate, depending on the value input into numYears 2- Write a program that accepts a user-entered number and calculates the square. Before calculating, check that the number is negative, and isn't zero. If either condition occurs, display a message stating that the operation can't be calculated. 3- Write a program which accept a number of 2 digits and check if ones digit is greater than the tens digit print the number in reverse order, if each of the ones digit and the tens digit greater than 5 print the average of them (ones and tens), otherwise print the message( NOT valid ). 4- Write C++ program to accept a number num (with any number of digits). Then, if the number of digits equal…
- Conditional Statements - Practice Questions • Write a python program to accept a number and o if the number is equal to 1, calculate Z = x % y o if the number is equal to 2, calculate Z = x // y o if the number is equal to 3, or negative o equal to 4, if the number is odd o if the number is equal to 5, not same o if the number is equal to 6, two numbers o if the number is equal to 7, two numbers o Otherwise print STOP check if the number is positive check if the number is even or check if two numbers are same or check the greatest number among check the smallest number amongPython Programming Only Please: Write a program that asks the user to enter a person’s age. The program should displaya message indicating whether the person is an infant, a child, a teenager, or an adult. Following are the guidelines: • If the person is 1 year old or less, he or she is an infant.• If the person is older than 1 year, but younger than 13 years, he or she is a child.• If the person is at least 13 years old, but less than 20 years old, he or she is a teenager.• If the person is at least 20 years old, he or she is an adult.A complex number is a number in the form a+bi, where a and b are real numbers and i is √(-1) The numbers a and b are known as the real part and imaginary part of the complex number, respectively. You can perform addition, subtraction, multiplication, and division for complex numbers using the following formulas: a + bi + c + di = (a+c) + (b+d)i (addition) a + bi − (c + di) = (a−c) + (b−d)i (subtraction) (a + bi) * (c + di) = (ac−bd) + (bc+ad)i (multiplication) (a + bi) / (c + di) = (ac+bd) / (c2+d2) + (bc−ad)i / (c2+d2) (division) You can obtain the Absolute Value for a complex number using the following formula: |a + bi| = √(a2 + b2) A Complex number can be interpreted as a point on a plane by identifying the (a,b) values as the coordinates of the point. The absolute value of the complex number corresponds to the distance of the point to the origin, as shown in the example below. (1) Design a class named Complex for representing complex numbers Include…