Write a program that reads in the radius of a circle as an integer and prints the circle's diameter, rcumference and area. Use the constant value 3.14159 for pi.
Q: Write a program that keep asking for a number until you enter a negative number. At the end, print…
A: all the steps as well as logic I explained in the comment of the program also add the screenshots of…
Q: Write a program that reads a floating point number and prints "zero" if the number is zero.…
A: Please find the answer below :
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 reads from the user two integers of three digits each. The program finds the…
A: import java.util.*;public class Main{ // to display the digits of number separated by space public…
Q: Write a program that accepts a number of minutes and converts it both to hours and days. For…
A: As no programming language is mentioned it is solved using basic C++
Q: Write a program that finds the sum, difference, and product of 2 given numbers.
A: Given: To write code in C++.
Q: Write a program that prompts for and reads the radius and the height of a cylinder (in centimeters).…
A: Program Plan: Create function volume1() to convert the volume of a cylinder by using pass by value…
Q: Write a program to read a number (n). Then print all numbers from 0 to n that are not equal to 1 or…
A: Here the program is developed as per the requirement. Note: In the question programming language is…
Q: Write a program that reads a positive integer less than 1,000,000 from the keyboard and then prints…
A: Answer in step2
Q: Write a program that will compute the area of a triangle
A: C program using height and base #include <stdio.h>#include <math.h>double…
Q: Create a program that prints a square with its sides using the symbol "*" and its inside using the…
A: Using the given requirements, a C++ program can be made with the help of “for loops” with two…
Q: Write a program that reads in the radius and length of a cylinder and computes the area and volume…
A: Given: Write a program that reads in the radius and length of a cylinder and computes the area and…
Q: Write a program that reads 11 integers, compares eachinteger with the 11th integer, and displays…
A: Note: In this question, the coding language is not specified then we are doing this question in the…
Q: Write a program that asks the user to type 2 integers A and B and exchange the value of A and B.
A: Integer variables are variables that must take an integer value
Q: Write a program that converts distances measured in kilometers to miles.One kilometer is…
A: Kilometers must be entered by the user. The kilometres variable holds this value. Since 1 kilometre…
Q: Write a program that reads two integers, a and b, from the user. Where a is equal to 17 and b is…
A: Note: Below is the required program in the python language. Program Approach: Ask the user to enter…
Q: write a program to find the smallest number among three numbers and then test that number is even or…
A: Note: Below is the required program in the C++ language. Programming Approach: Defining the…
Q: Write a program that reads the value of x and y, then if x is bigger than or equal y calculate and…
A: Math functions used in the program Math.pow() Math.cos The program first inputs the value of x and…
Q: Write a program that asks the user to input 10 numbers and counts how many odd numbers that user…
A: Algorithm:- (I) declare array of size 10. (II) using loop take input . (III) use modulo 2 to…
Q: Write a program that takes an integer as an input and returns whether it is a prime number or not.
A: Q. Write a program that takes an integer as an input and returns whether it is a prime number or…
Q: Write a program that asks the user for a number and prints out the number cubed (raised to the power…
A: Lets see the solution.
Q: Write a program that takes as input a number of kilometers and prints the corresponding number of…
A: km = int(input("Enter the number of kilometers: ")) nautical_miles = (1/10000) * (90 * 60) * km…
Q: Write a program that prints the day number of the year, given the date is in the form month day…
A: "because of our policy, we can solve one question at a time if you need the rest of the solution…
Q: Write a program that prompts the user to enter a three-digit integer and determines whether it is a…
A:
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 that reads 3 integers and prints the maximum value among them. (without using max())
A: function main: Start Read num1, num2, num3 if num1 >= num2 and num1 >= num3 then largest =…
Q: Write a program that inputs a line of text from the user and counts; the total numbers of…
A: take user input of a line of text vowelCount ← 0 : variable for calculation and show output vowel…
Q: Write a program that asks the user to enter 2 integers of 4 digits and displays the different digits…
A: Use an array to store individual digits of each number and then compare these two arrays bit by bit…
Q: Write a program that reads the height h and radius r of Right Circular Cone and finds the surface…
A: In this question, we are asked to create a java program to calculate the surface area and volume of…
Q: Write a program that reads text from the user and reverses the order of every number that appears in…
A: Solution:-- 1)The given question has required for the solution to be provided with the help of the…
Q: Write a program to read a number (n). Then print all numbers from 0 to n that are not equal to 2 or…
A: Step-1: Start Step-2: Declare variable n and take input from user Step-3: Start a for loop i=0 to n…
Q: write a program that asks the user to enter an angle in degrees and prints out the sine of that…
A: We need to write a program that takes input of an angle from user in degrees and print the sine of…
Q: Write a program that translates a letter grade into a number grade. Letter grades are A, B, C, D,…
A: Please find the answer below :
Q: Write a program that translates a letter grade into a number grade. Letter grades are A, B, C, D,…
A: ANS: I had written the code in C language: #include <stdio.h> int main(){ float a;…
Q: Create a program that will accept a length value in meters and print its equivalent length in yards.…
A: Programming Language used: C Language C code for the given scenario: #include <stdio.h> int…
Q: Write a program to read two integers, then test if the two numbers are divisible by (5,6) at the…
A: Write a program to input two numbers and check if both are divisible by 5 and 6 at the same time
Q: Write a program that makes a shape of numbers same as the one below, for a number 'x' that is…
A: the below code is in c++. The question is as follows. if the given number is 7 then 1 22 333 4444…
Q: Write a program that reads a number in feet, converts it to meters, and displays the result. One…
A: PROGRAM CODE: import java.util.Scanner; public class Main { public static void main(String[] args) {…
Q: Write a program that reads an unspecified number of scores and determines how many scores are above…
A: # include <iostream> using namespace std; int main() { int i=0; int scores[i]; int count = 0;…
Q: Write a program that shows the numbers up to the entered number that are divisible by 6 but not…
A: Here I have first of all asked the user to enter a number and stored it into a variable num. Now I…
Q: Write a program that reads an integer and displays all its smallest factors in an increasing order.…
A: Since the program language not specified the program has been developed using Java to satisfy the…
Q: Write a program that inputs a number and checks whether it is a perfect number or not. A perfect…
A: PERFECT NUMBERS A perfect number is a number that is equal to the sum of its proper divisors.…
Q: Write a program that reads an unspecified number of integers, determineshow many positive and…
A: Given: Write a program that reads an unspecified number of integers, determineshow many positive and…
Q: Write a program to print even numbers from 1 to 10, print every number in a separate line.
A: Write a program in JAVA language to print even numbers from 1 to 10 in separate lines.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- Three numbersa. Write a program that reads three numbers and prints “all the same” if they are allthe same, “all different” if they are all different, and “neither” otherwise.b. Write a program that reads three numbers and prints “increasing” if they are inincreasing order, “decreasing” if they are in decreasing order, and “neither”otherwise. Here, “increasing” means “strictly increasing”, with each value largerthan its predecessor. The sequence 3 4 4 would not be considered increasing.c. Repeat part b. but before reading the numbers, ask the user whetherincreasing/decreasing should be “strict” or “lenient”. In lenient mode, thesequence 3 4 4 is increasing and the sequence 4 4 4 is both increasing anddecreasing6. A palindrome is a number or text phrase that reads the same backwards or forwards. For example, each of the following five-digit integers is a palindrome: 12321, 55555, 45554 and 11611. Write a program that reads a 5 digit integer and determines whether it is a palindrome. Hint: One way to do this is to use division (/) and modulus (%) operators to separate the number into individual digits.23. A perfect number is a positive integer that is equal to the sum of its positive divisorsexcept the number itself. The first two perfect numbers are 6 and 28 since 6=1+2+3and 28=1+2+4+7+14. Write a computer program that finds thefirst four perfect numbers
- A palindromic number is a number that is the same when written forwards or backwards. The first few palindromic numbers are therefore are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121, 323 Input a number from the user. Write a program that reverses the digits of a number. Use this program to find if the number is a palindrome. Print if the number is palindrome or not.7) The ideal gas law allows the calculation of volume of a gas given the pressure(P), amount ofthe gas (n), and the temperature (T). The equation is:V = nRT / PSince we only have used integer arithmetic, all numbers will be integer values with nodecimal points. The constant R is 8.314 and will be specified as (8314/1000). This givesthe same result. Implement the idea gas law program where the user is prompted for andenters values for n, T, and P, and V is calculated and printed out. Be careful toimplement an accurate version of this program. Your program should include a properand useful prompt for input, and print the results in a meaningful mannerCreate a different version of the program that: Takes a 3-digit number and generates a 6-digit number with the 3-digit number repeated, for example, 391 becomes 391391. The rule is to multiply the 3-digit number by 7*11*13. Takes a 5-digit number and generates a 10-digit number with the 5-digit number repeated, for example, 49522 becomes 4952249522. The rule is to multiply the 5-digit number by 11*9091. Times 11: A two-digit number can be easily multiplied by 11 in one's head simply by adding the digits and inserting that sum between the digits. For example, 43 * 11 has the resulting digits of 4, 4+3, and 3, yielding 473. If the sum between the digits is greater than 9, then the 1 is carried to the hundreds place. Complete the below program. Create a different version of the program that: Takes a 3-digit number and generates a 6-digit number with the 3-digit number repeated, for example, 391 becomes 391391. The rule is to multiply the 3-digit number by 7*11*13. Takes a 5-digit…
- Write a program that reads from the user a character ('q' or 'c'). If the character is 'c', the program reads from the user the radius rof a circle and prints its area. • If the user enters 'q', the program asks the user to enter the length and width of a quadrilateral. We assume the quadrilateral is either a square or rectangle. You should print if the quadrilateral is square or rectangle. • Otherwise, it prints "Wrong character" PS: Use the following formulas: area of circle=3.14*r Sample Run1: Enter a character (q or c): q Enter the Length and Width: 80 150 |It is a rectangle Sample Run2: Enter a character (q or c): q Enter the Length and Width: 80 80 It is a square Sample Run3: Enter a character (q or c): c Enter the radius: 2 The area of the circle is 12.56 Sample Run4: Enter a character (q or c): d Wrong characterPython programming only FIX THE ERRORS IN THE CODE EXERCISE Here is a program on calculating grades. Please correct the errors in the program.# Calculating Grades (ok, let me think about this one)# Write a program that will average 3 numeric exam grades, return an average test score, a corresponding letter grade, and a message stating whether the student is passing. # Average Grade# 90+ A# 80-89 B# 70-79 C# 60-69 D# 0-59 F# Exams: 89, 90, 90# Average: 90# Grade: A# Student is passing.# Exams: 50, 51, 0# Average: 33# Grade: F# Student is failing.exam_one = int(input("Input exam grade one: "))exam_two = input("Input exam grade two: "))exam_3 = str(input("Input exam grade three: "))grades = [exam_one exam_two exam_three]sum = 0for grade in grade: sum = sum + gradeavg = sum / len(grdes)if avg >= 90: letter_grade = "A"elif avg >= 80 and avg < 90 letter_grade = "B"elif avg > 69 and avg < 80: letter_grade = "C'elif avg <= 69 and avg >= 65: letter_grade = "D"elif:…Airline companies apply baggage restrictions for their passengers. An airline company has decided to apply a 10kg limitation for passengers' hand luggage and 20kg for their normal baggage. When passengers arrive, they enter their hand and normal luggage weight from the keyboard. If passengers exceed their normal baggage allowance of 10 dollars per gram, they pay 12 dollars per kg. Accordingly, write the program that calculates the baggage price of the airline they will go to according to the baggage values entered by the arriving passenger and keeps this from closing the program for each passenger. Note: If hand and normal baggage allowances are stretched below the maximum value, the payment amount will be considered not negative. An example printout is given on the right. Geri bildirim gönder
- Write a program that reads from the user a character (*q' or 'c'). If the character is 'c', the program reads from the user the radius r of a circle and prints its area. If the user enters 'q', the program asks the user to enter the length and width of a quadrilateral. We assume the quadrilateral is either a square or rectangle. You should print if the quadrilateral is square or rectangle. Otherwise, it prints "Wrong character" PS: Use the following formulas : area of circle=3.14*r? IPython Write a program that receives a number from a user and checks if it's float or integer.In case of being float, print for the user that his/her number is float with integer part andfractional part. In case of being integer, print to the user that his/her number is aninteger and odd/even numbeRWrite a program that displays every integer between 1 and 100 that is divisible by 5 or 7, but not both. Write it using While and for.