Write a program that accepts two numbers by the user, checks if the denominator iszero, divides them and then prints their division. If the denominator is zero, it shouldprompt the user “Division is not possible”.
Q: Write a program that takes the user age and prints the following: Print too old, if age is greater…
A: Use if else if statements to check all the conditions one by one
Q: Write a program that prints all numbers between 1 and 100 that are divisible by both 5 and 7.
A: for num in range(1,100): if num%5==0 and num%7==0: print(num)
Q: Write a program that finds a number positive or
A: We need to read in a number and call the function to check a number is positive or not.
Q: Write a program that asks users when their birthday is. Use information provided to give them their…
A: Program Approach - Use the header files as per the requirement for the code. Define the main…
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 reads a number and finds it is a prime or not. 0. A prime number is a number…
A: Below is the required program in C++ language. Program Approach: Include header files and use…
Q: Write a program that picks four cards from a deck of 52 cards and computes their sum. An ace, king,…
A: program plan: Write a program that picks four cards from a deck of 52 cards computes their sum with…
Q: Write a program using if, and elif and else, that asks the user what their favorite food is. Then…
A: We need to read a string and compare the string with list of favorite food.
Q: Write a program that takes all 3 sides of a triangle and prints whether the triangle is equilateral,…
A: Algorithm: Start Input three sides of the triangle from user If side1==side2 and side2==side3 then…
Q: Write a program that accepts a number entered by the user and validates if it is odd oreven. If it…
A: Sample Response: #python3 program#accept a numbernum = int(input("Enter a number: "))#validate the…
Q: Write a program that finds five prime numbers largerthan Long.MAX_VALUE.
A: Program: //import math package for mathematical operations import java.math.*; public class Main {…
Q: Write a program that lets the user enter the coordinates of the center and radius of two circles,…
A: Answer: C++ Source Code: #include <iostream>#include <cmath> using namespace std; int…
Q: Write a program that reads a word and prints whether it is short (fewer than 5 letters). • it is…
A: #include<iostream> #include<iomanip> #include<string> using namespace std; int…
Q: Write a program that asks the user for a number of seconds and prints out how many minutes and…
A: Program: To asks the user for a number of seconds and print as minutes and seconds format.…
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 three numbers and prints "all the same" if they are all the same, "all…
A: Please find the answer below :
Q: Write a program that shows the growth of money that occurs in a savings account. Your program should…
A: Program code: #prompt the user to enter initial balance initialBalance=int(input("Enter initial…
Q: Write a program that reads an integer and determines and prints whetherit’s odd or even. [Hint: Use…
A: C++ Program for above : #include <iostream> using namespace std; int main() { //read…
Q: Write a program that read an integer, and then finds and prints the sum of the even and odd…
A: As per the requirement program is developed. Note : As per our guidelines we are suppose to answer…
Q: Write a program that computes the amount of calories burned when you run. Your program should ask…
A: Hi there, Please find your solution below, I hope you would find my solution useful and helpful.…
Q: Write a program that asks the user to enter a month (1 for January, 2 for February, etc.) and then…
A: Code: #include <iostream> using namespace std;//here is the main functionint main(){ //here…
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 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 calculates an adult's fat-burning heart rate, which is 70% of 220 minus the…
A: Start input age through get_age function if person is not in between 18 to 75 the print message…
Q: Write a program that simulates throwing a dices n times
A: Below is solution python program with detail explanation using python comments. import random def…
Q: Write a program that accepts a number and determines whether the number is even. If it is even,…
A: Here I written C code for given even problem below. I hope you like it.
Q: Write a program that interprets the Body Mass Index (BMI) based on a user's weight and height. It…
A: Python code to find BMI of person is given below.
Q: Write a program that receives a number from a user and checks if it's float or integer. In case of…
A: First we declare the number variable, which gets input from the user. Also, we declare a variable…
Q: Write a program for determining if a year is a leap year. In the Gregorian calendar system you can…
A: Answer :
Q: Write a program that reads in two integers and determines and prints if the first is a multiple of…
A: Note: As no programming langauge is mentioned, therefore answering in python language. Input : Two…
Q: Write a program in C++ that : • Asks user to input an integer numbers, until the user input 0. •…
A: Algorithm: Start Initialize evenCount=0,oddCount=0, positiveCount=0, negativeCount=0; Ask the user…
Q: make this into a problem: Here we have implemented the program that displays whether the user input…
A: Note:- always mention programming language name. This program is done using c++. logic:- read A, B…
Q: Write a program that asks the user how many credit units they have taken. If they have taken 23 or…
A: Program Approach: Include the necessary header files for the standard I/O. Declare a user input…
Q: Write a program that reads some integers between 1 and 100 and counts the occurrences of each.
A: Lets see the solution.
Q: write a program that prints all multiples of 5 between 5 and 50 inclusive and then reads a number…
A: Since you have not mentioned any specific programming language, we will solve this question for you…
Q: Write a program which repeatedly reads numbers until the user enters "done". Once "done" is entered,…
A: As per the question statement, We will run this code and try out different input value and will…
Q: Write a program for determining if a year is a leap year. In the Gregorian calendar system you can…
A: Since programming language is not mentioned, I have done this using Python 3.
Q: Write a program that reads a set of integers from user and then prints the sum of even and odd…
A: Use an infinite loop to accept inputs and whenever 0 or any negative value is entered exit from loop…
Q: Write a program in clojure programming to comaore two number with each other and another pair is…
A: Required:- Write a program in Clojure programming to compare two numbers with each other and…
Q: Write a program that asks the user for a negative number, then prints out the product of all the…
A: Solution: Since any specific language for the above question is not mentioned, we have solved…
Q: Write a program that asks the user for twwo words and prints them out joined together with no space:…
A: Answer :
Q: Write a program that accepts a number imput and checks if the difference between the sum of digits…
A: here we have written a program in c which accepts a Fibonacci number and check the difference…
Q: Write a program that reads from the user a character ('s' or 'a'). • If the character is 's', the…
A: As no programming language is mentioned, it is solved using basic C++
Q: Write a program that will read a number and will display the factors of the number. Factors are…
A: Program code: x=int(input("Enter a number: "))print("The factors of",x,"are:")for i in range(1, x +…
Q: Write a program that asks the user for an animal sound, then prints out that sound twice on the same…
A: the answer is given below:-
Q: Write a program that accepts a number entered by the user and prints its Fibonacciseries up to 10…
A:
Write a
zero, divides them and then prints their division. If the denominator is zero, it should
prompt the user “Division is not possible”.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
- Write a program that asks the user to enter 10 numbers, that range from 10-100. Make sure that you do not accept any numbers less than 10, if a user enters a number that is less than 10 then ask him again. Once the user enters all 10 numbers, sort the numbers entered in ascending order and print them out. CSharpplz solve it asap ????????: Write a program for a game that consists of two players. The rule of the game is that player 1 inputs a random number from 1-100. Player 2 will input 5 numbers. If the summation of those numbers is equal to the number OR less than or greater than the number by 3 (+3 or -3), then player 2 wins. Otherwise, player 1 wins. Test Case 1 Input Player 1, enter a number: 50 Player 2, enter a number: 10 Player 2, enter a number: 10 Player 2, enter a number: 20 Player 2, enter a number: 5 Player 2, enter a number: 7 Output Player 2 wins Explanation: The summation of 10,10,20,5 and 7 is 52 which is greater than 50 by 2. According to the rule, player 2 wins. Test Case 2 Input Player 1, enter a number: 50 Player 2, enter a number: 10 Player 2, enter a number: 10 Player 2, enter a number: 20 Player 2, enter a number: 5 Player 2, enter a number: 1 Output Player 1 wins Explanation: The summation of 10,10,20,5 and 1 is 46 which is less than 50 and also doesn’t…Write a program that lets the user guess whether a randomly generated integer would be even or odd. The program randomly generates an inte- ger and divides it by 2. The integer is even if the remainder is 0, otherwise odd. The program prompts the user to enter a guess and reports whether the guess is correct or incorrect.
- Write an application that reads an integer and determines and prints whether it’s odd or even. [Hint: Use the remainder operator. An even number is a multiple of 2. Any multiple of 2 leaves a remainder of 0 when divided by 2.]f. A laborant in a laboratory does a number of antigen tests in one day. Write a program that simulates the number of antigen tests done in a day in a laboratory, displays the number of positives and negatives, and calculates the % of positives in one day. Your program needs to first generate a random number that will show the number of tests done in a day. One laboratory in a day cannot do more than 100 tests and less than 1 (they do at least one). Then for each of the tests, your program needs to generate a random number to show whether they are positive or negative. In order to write this program, you need to have the following three functions used by the main function: test result (void): This function generates a test result. It should randomly return either one or zero. 1 means positive test result and 0 means negative test result. float positive percentage (int,int) : This function takes the total number of positives and the total number of tests and returns the % of positives.…Write a program that accepts a number entered by the user and validates if it is odd oreven. If it is even, print a series up to 4 using range() and if it’s odd print a series up to 7.
- 4- Write a program that reads the average of 30 students and find the number of pass students , the number of fail students then print the results. 5- Write a program that reads 20 numbers then find the number of negative and positive numbers and the number of numbers equal to zero and print the results. 6- Write a program to read three numbers A,B,C then find whether A,B,C can form the sides of a triangle, if yes compute the parameter of the triangle , if no print the massage ( not a triangle), then determine whether A,B,C form the side of an (a)) equilateral triangle ,b) isosceles triangie ,c)) right angle triangle Hint: ( A,B,C can form a triangle if each side is less than the sum of the other two sides)Extreme Fizz BuzzFizz Buzz is a classic Computer Science problem about Selection. For an integer x, print:• “Fizz” if x is only divisible by 3,• “Buzz” if x is only divisible by 5,• “FizzBuzz” if x is divisible by both 3 and 5,• the number x if it is not divisible by both 3 and 5.This problem is the extreme version of Fizz Buzz. You are given a list of K distinct integers A and a list of K characters S. Both lists are numbered from 1 to K. The integer Ai corresponds to the character Si. Denote B as the subset of A. There will be a rule for each possible subset: if an integerx is only divisible by all elements in B, print a string which is the concatenation of the corresponding character of each element in B, sorted by the index in ascending order. However, if B is an empty subset, print the first digit of x instead. Does it look complicated? Do not worry, as it is just a generalization of the regular Fizz Buzz. For example, if A = [3, 5] and S = [F, B], you will get the normal Fizz…Write a program that reads student scores, gets the best score, and hence assigns grades based on the following scheme: Grade is A if score is > = best - 10; Grade is B if score is > = best - 20; Grade is C if score is > = best - 30; Grade is D if score is > = best - 40; Grade is F otherwise. The program prompts the user to enter the total number of students, then prompts the user to enter all of the scores, and concludes by displaying the grades. Language: C++
- In python, a) In the Hi-Lo game, the player begins with a score of 1000. The player is prompted for the number of points to risk and a second prompt asks the player to choose either High or Low. The player’s choice of either High or Low is compared to a random number between 1 and 13, inclusive. If the number is between 1 and 6 inclusive, then it is considered “low”. A number between 8 and 13 inclusive is “high”. The number 7 is neither high nor low, and the player loses the points at risk. If the player had guessed correctly, the points at risk are doubled and added to the total points. For a wrong choice, the player loses the points at risk. Create a HiLo application based on this specification. Application output should look similar to b) Modify the application to allow the player to continue until there are 0 points left. At the end of the game, display the number of guesses the user took before running out of points.Python Programming: You are roaming in a random city and you have lost. You see a sign board and where that is return is that you can go to X and Y street if 1 <= Y - X <= K, where K is a value that is written on the board. You have to reach to your hotel in such a way that it is minimal. Input Output 31 10 251Guess The Number Game: write a program that will ask the user to guess a secret numberrandomly generated by your program between 1-10. Player have 3 trials to guess the number.After each trial, you have to inform the user, either he/she has guessed it correctly or not, andthe remaining trials to guess the number. In each trial your program should generate a newrandom number. If user guess at least twice correctly, then shows the message, “you won by 2-1” and vice versa for losing.When game is over, ask the user to play again: If the user types "yes", the game start again.else stop the game.