Write a program that reads a floating point number and prints "zero" if the number is zero. Otherwise, it prints "positive" or "negative" (as appropriate). Add "small" if the absolute value is less than 1, and add "large" if the absolute value is greater than 1000.
Q: Write a program to read the radian of a circle, check if it is bigger than zero, and if it is to…
A: #include <stdio.h> #define PI 3.14f int main(){float rad,area, perm;printf("Enter radius of…
Q: Write a program that reads in the radius of a circle as an integer and prints the circle's diameter,…
A: Actually, program is a executable software that runs on a computer.
Q: Write a program that reads a floating point number and prints "zero" if the number is zero.…
A: """Program will read a floating-point number and print "zero"if the number is zero.Otherwise, print…
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 java program that reads an integer and check whether it is negative, zero or positive
A: Required:- Write a java program that reads an integer and check whether it is negative, zero, or…
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 generates 50 random numbers such that the first number is between 1 and 2, the…
A: ## As no language is mentioned, the code is written in Python. import random # for loop runs…
Q: Write a Java program that prints the number of odd numbers from 1 100 and print each even number in…
A: Algorithm : Step 1 : declare variables. Step 2 : initialize counter variable to 0. Step 3 : use for…
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: Write a program that shows that the square of the normal is χ2
A: Given To know about the programming and program of square of number.
Q: Write a program which replaces all vowels with their corresponding numbers (e.g. a is 1, e is 2, i…
A: Algorithm : Step 1 : ask for the word from the user. Step 2 : declaring and initializing string…
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 simulates flipping a coin twomillions times and displays the number of heads…
A: Program code: //import the required packagesimport java.util.*;//Declare class HeadTailCoinpublic…
Q: write a program that reads the height in centimeters and then converts the height to feet and…
A: NOTE: As the programming language is not mentioned in the question. So, we have solved this question…
Q: Write a program that reads in an integer and breaks it into a sequence of individual digits. For…
A: We will be solving the question in Python for easy understanding. We will be taking our input in a…
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 which reads two integers and prints out the sum, the difference and the product.…
A:
Q: Write a program (Li and displays, using asterisKs, a filled diamond. For example, if the generated…
A: Answer Code in Python n = int(input("Enter the value:")) for i in range(n): print(" "*(n-i),…
Q: Write a program that will draw a reversed triangle. Your program will ask for the height of the…
A: Task :- Write a C++ program to print the pattern. C++ program :- #include<iostream>using…
Q: Write a program that reads a floating point number and prints "zero" if the number is zero.…
A: The python program for the given question is detailed below.
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 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 splits a 4-digits integer number into thousands, hundreds, tens, and ones. For…
A: Note: Answering the question in python as no language is specified. Input : Input the number.…
Q: Write a program that reads an integer between 0 and 1000 and multiplies all the digits in the…
A: SINCE NO PROGRAMMING LANGUAGE WAS MENTIONED, THIS CODE IS WRITTEN IN PYTHON.
Q: Write a program (Là and displays, using asterisks, a filled diamond. For example, if the generated…
A: As no programming language is mentioned, we am writing the program in c++ #include…
Q: Write a program that produces a triangular grid of numbers as a seating chart (start at 1 in the top…
A: Given:
Q: Did you know that in lotteries, a 3-digit number with the same numbers in all digits like 777 will…
A: The question asks that we are given a 3 digit number and another number. if all of the digits…
Q: Write a program to read A[n, n] of numbers, then put 10 instead each even positive number.
A: Program is written in java and commented correctly with output. Algorithm: 1. Read array of n rows…
Q: Write a Java program that reads a double and prints "zero" if the number is zero. Otherwise, print…
A: Here there is two different programs given so I have provided answer for code 1 with output.
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 reads in three numbers from the keyboard and then prints those numbers in…
A: Two questions are asked. So the only the first question will be answered. Please upload another…
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 that works out whether if a given year is a leap year. A normal year has 365 days,…
A: As no programming language is mentioned, it is solved using basic C++
Q: Write a program that prints out first 40 numbers divisible by 3.
A: As you have not mentioned the programing language we are providing the program in Python language.
Q: Write a program that reads 10 numbers, finds the largest number, prints it, finds the smallest…
A: Given: Write a program that reads 10 numbers, finds the largest number, prints it, finds the…
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 an integer and prints how many digits it has by checking whether the…
A: NOTE Below is the program for the given question. Hope you understand it well. If you have any…
Q: Write a program that reads (n) from numbers and calculates the sum of positive numbers only.
A:
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 read a positive number and determine whether it is odd or even number. Print…
A: In the solution i have Made an Python program for a positive number to input by the user and…
Q: Write a program that simulates flipping a coin one million times and displays the number of heads…
A: Code: public class CoinFlip { public static void main(String[] args) { int heads = 0; int…
Q: Write a program that generates a random number between 1 and 50 and asks the user to guess it. As a…
A: EXPLANATION: - The program involves these main tasks: - Generate the random number in range 1 to…
Q: Write a program that will display the even numbers from 1 to 100.
A: As per our company guidelines, we are supposed to answer only one question per post and kindly…
Step by step
Solved in 2 steps with 4 images
- 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 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…6. 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.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 anddecreasing
- 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? If. 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 displays every integer between 1 and 100 that is divisible by 5 or 7, but not both. Write it using While and for.
- 4) Write a program that reads three numbers and prints "all the same" if they are all the same, "all different" if they are all different, and "neither" otherwise.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önder1. Write a program that prints your full name. Write a program that prints your full name using asterisk(*). Write a program that prints a square, a rectangle and a triangle using asterisk. Write a program that adds THREE(3) numbers. Write a program that multiply THREE(3) numbers. Write a program that divides TWO(2) numbers.
- . Write a program that generates and prints 50 random integers, each between 3 and 6. .Write a program that generates a random number, x, between 1 and 50, a random number y between 2 and 5, and computes x". .Write a program that generates a random number between 1 and 10 and prints your name that many times. .Write a program that generates a random decimal number between 1 and 10 with two decimal places of accuracy. Examples are 1.23, 3.45, 9.80, and 5.00.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 characterWrite a program that generates a plate number based on the user's answer to the following questions: 1. What is your favorite color of the rainbow (ROYGVIB)? a. Use the first letter of the chosen color as the first character of the plate number. b. Display "Invalid Input" and ask the user to re-enter his/her answer if the answer is not a valid color of the rainbow. 2. What is your month of birth? a. Use the last letter of the month as the second character of the plate number. b. Display "Invalid Input" and ask the user to re-enter his/her answer if the answer is not a valid month. 3. What is your first name? a. Use the third letter of the first name as the third character of the plate number. No need to include the second name if you have a second name. Make sure to use "cout" and "cin" to collect the necessary inputs from the user. For the number section: 1. Ask the user his/her age and use the age as the first and second digits of the plate number. a. Display "Invalid Input" and ask…