Circle Areas
The formula to compute the area of a circle is
area = PI * radius2
so if a circle’s radius doubles (i.e., is multiplied by 2), the circle’s area will be four times as large as before. Write a
Want to see the full answer?
Check out a sample textbook solutionChapter 5 Solutions
Starting Out With C++: Early Objects (10th Edition)
Additional Engineering Textbook Solutions
Starting Out with C++ from Control Structures to Objects (9th Edition)
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Thinking Like an Engineer: An Active Learning Approach (4th Edition)
INTERNATIONAL EDITION---Engineering Mechanics: Statics, 14th edition (SI unit)
Starting Out with C++: Early Objects (9th Edition)
- Microwaves / Radio Waves If a scientist knows the wavelength of an electromagnetic wave she can determine what type of radiation it is. Write a program that asks for the wavelength in meters of an electromagnetic wave and then displays what that wave is according to the following chart. (For example, a wave with a wavelength of 1E-10 meters would be an X-ray.) 1x 10-11 1 x 10-8 4 x 10-7 7x 10-7 1x 10-3 1 x 10-2 Gamma Rays. X Rays Ultraviolet Visible Light Infraredarrow_forwardParty-On sells individual hot/cold cups and dessert plates for parties. SueChen wants a program that allows her to enter the price of a cup, the price of a plate, the number of cups purchased, and the number of plates purchased. The program should then calculate the total cost of the purchase, including the sales tax. Finally, the program should display the total cost on the screen. Desk-check your solution’s algorithm using $0.50 as the cup price, $1 as the plate price, 35 as the number of cups, 35 as the number of plates, and 2% as the tax rate. Then desk-check it using $0.25, $0.75, 20, 10, and 6%.arrow_forwardLab 6: Multiplication Table Write a program that will continually ask the user to enter a positive number from standard input and print out the multiplication number table until user enters an alphabet (non number) to quit. Once user enters 'Q' or anything other than a number, the program will print out “Have a nice day" and then exit the program. After reading the user's input the positive number, the program will print out the multiplication table of the inputted number. For example, if user enters 5, the table should be: Multiplication table for 5 is: 2 3 4 5 4 6 8 10 9 12 15 8 12 16 20 5 10 15 20 25 Your program needs continuously ask the user to enter the a positive number until the user enters Q or q to exit the program. Your program must print out your names and lab info as you did in previous lab similar to the following: Program written by: Ron Sha Course info: Cs-102 Lab 6 - Multiplication Table Date: Wed Oct 14 11:35:18 2020 Activate un 1.2345arrow_forward
- Area and Perimeter: Write a program that prints the area and perimeter of a circle with a radius of 5.5 using the formula: Perimeter = 2 * radius * PI Area radius * radius * PI Use Math.PI for PI in your program.arrow_forwardC#arrow_forwardMax Number Budi, Anto and Hani are playing a game called Max Number. Budi will ask Anto to say N numbers to put into a bag and also ask Hani to say M numbers and remove that number from the bag and next they will find the maximum number from the bag. Format InputThe first line contains two integers N stating total numbers that will be stored into bag and M stating the total numbers that want to be removed from the bag. The second lines contains N numbers that will be stored into the bag. The third lines contains M numbers that want to be removed from the bag. Format OutputOutput with a format “Maximum number is X”, where X is the maximum number in the bag. If no numbers in the bag, the application will give an output “Maximum number is -1” Constraints• 1 ≤ N ≤ 100• 1 ≤ M ≤ N• 1 ≤ numbers ≤ 999 Sample Input 1 (standard input)10 399 20 10 8 99 4 9 93 66 5599 94 10 Sample Output 1 (standard output)Maximum number is 93 Use C Language.arrow_forward
- mystery_value = 5 #You may modify the lines of code above, but don't move them!#When you Submit your code, we'll change these lines to#assign different values to the variables. #Write a program that divides mystery_value by mystery_value#and prints the result. If that operation results in an#error, divide mystery_value by (mystery_value + 5) and then#print the result. If that still fails, multiply mystery_value#by 5 and print the result. You may assume one of those three#things will work.##You may not use any conditionals.# #Add your code here!arrow_forwardCS102 Programming language is C++.arrow_forwardFibonacci sequence: The first two numbers of the fibonacci sequence are 1 and 1, and sequential numbers are the sum of the previous two. Write a program that prompts the user for an integer n and then prints the first n numbers of the Fibonacci sequence (Please type answer no write by hend)arrow_forward
- Python: VOWEL OR CONSONANT Challange Ask the user to input a word. The program will then tell them how many letters are in the inputted word. It will also tell them how many vowels and consonants are in the word. It will then ask which number (between 1- the length of their word - DO NOT USE THE PLACEHOLDER ZERO) that they would like to pick. It will then tell them whether that letter is a vowel or consonant. Next the program will pick a random letter from the word that was inputted, print that letter and tell the user whether it is a vowel or consonant: OUTPUT: What is your word?: Larry There are 5 letters in Larry. There are 1 vowel and 4 consonants For your word, L is "1" and Y is "5" Which letter do you want 1-5? 4 The letter you picked is an "r" and that letter is a CONSONANT and there are two of them I picked a random letter from your word, it is "a" The letter I randomly picked is a VOWEL Remember : vowels are "a, e, i, o, u" a "y",should output as "…arrow_forwardFibonacci series is that when you add the previous two numbers the next number is formed. You have to start from 0 and 1. E.g. 0+1=1 → 1+1=2→ 1+2=3 →2+3=5 → 3+5=8 → 5+8=13 So the series becomes 0 11 2 3 5 8 13 21 34 55 Steps: You have to take an input number that shows how many terms to be displayed. Then use loops for displaying the Fibonacci series up to that term e.g. input no is =6 the output should be 0112 3 5arrow_forwardPerfect Number Checker: Create a program that checks if a given number is a perfect number. A perfect number is one where the sum of its divisors (excluding itself) equals the number.arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage