EX 3 using one print statment, print out "the answer to everything is 3" you must create the number three by adding two numbers together
Q: 10. write a program to enter 10 numbers ,then count how many number are positive,after that find the…
A: As a programming language is not mentioned i attempted this question in c
Q: z=0 i=2 n=int(input("Enter any number")) while i<=n: z=z+i / i+2 print (z) i=i+1 for the above…
A: Given python code, z=0 i=2 n=int(input("Enter any number")) while i<=n: z=z+i/i+2 print(z)…
Q: 8. Write code to find the sum of even number between 1 to 30 numbers and print the result by using…
A: the answer is given below:-
Q: The variable x starts with the value 0. The variable y starts with the value 5. Add 2 to X. Add 2…
A: As no programming language has been used, Java has been used.
Q: (Convert Celsius to Fahrenheit) Write a program that reads a Celsius degree from the console and…
A: The Answer is in below Steps
Q: Exercise 2: Ask for a favorite song, favorite movie, and favorite book. Use print statements to ask…
A: Use scanner class methods to accept input from user and nextLine() method is used to read a string…
Q: Convert Months Write a program that allows the user to enter a whole number of monthsand then…
A: As no language was mentioned in the question, so I have done this using C++. Here I have taken…
Q: Q/ Lab/Write a program to enter the height and width of flat shape, then check whether this shape is…
A: As per the given problem, we have to write a program to input height and width of a shape and check…
Q: Q1: Write a program to enter (15) numbers by using inputbox satement, then find (1):the average of…
A:
Q: int t1 = 0, t2 = 1; // initialize the next term (3rd term) int nextTerm = t1 + t2; // get no. of…
A: THe answer is
Q: (Average speed in miles) Assume that a runner runs 15 kilometers in 50 minutesand 30 seconds. Write…
A: code: //class definition public class Main { //main method public static void main(String[] args)…
Q: Part B: Chore Bonus Your parents pay you $3 for each trash bag full of leaves you rake. If you can…
A: According to the information given:- We have to follow the instructions mentioned to get the desired…
Q: estion 1 The following statement is incorrect. Write the correct statement. a = (x < 16): 5? 11;
A: According to the Question below the Solution: Program Output:
Q: Lab p-1) Write a program that calculates the following math equation: |axb e a=30, b=23, c=13
A: 1)calculate first d=a*b 2)next calculate d/c into e 3)calculate f into square root of e using…
Q: Summary During winter when it is very cold, typically, everyone would like to know the windchill…
A: Program code: //include required header files #include <iostream> #include <cmath>…
Q: Q1: Identify and correct the errors in each of the following statements: 1. int num=1, sum; //sum…
A: 1. Sum the odd number between 1 to 100 int num= 1; int sum =0; while (num <= 100) {…
Q: Exercise 5: ■ Write a program that finds the summation for the odd and even numbers [for the numbers…
A: 1.Write a program that finds the summation for the odd and even numbers [for the numbers from 0 to…
Q: Qi/ Lab/Write a program to enter the height and width of flat shape, then check whether this shape…
A: #include<iostream> using namespace std; int main(){ int height, width; cout<<"Enter the…
Q: 11. Which mathematical expression from the below is represented by the fo in lovo 3
A: Question 11: The expression is given in java as '*' operator is being used.
Q: Excercise2: write a program to print the name of day when entering the number of the day. (For…
A: Since you have not mentioned programming language I'm doing this in c++
Q: Q: 3: Input a number/value from the user check whether it is negative or positive. If it is negative…
A: The if-else statement in C is used to perform the operations based on some specific condition. The…
Q: x int (input("Enter a number: ")) if ( Fill this part ): print(x) Fill the part, which is painted in…
A: we have to use the && (and) operator to specify both the conditions
Q: Assume that the 4-digit numbers that are equal to the square of the sum of the numbers divided into…
A: Programming instructions: Take input from the user. Split the number into two equal parts. Add…
Q: 5.17 LAB: Countdown until matching digits Write a program that takes in an integer in the range…
A: Given: To write a code.
Q: Tera __________________ is Better known as _______________.
A: Given fill in the blank question is based on storages.
Q: Q3. Write an algorithm and draw a flow chart to get student level and CGPA as input and check if…
A: function main(): Start Declare student_level, cgpa Read student_level, cgpa if student_ level ==…
Q: Exercise 6: Write a program that asks the user to enter number and read it. Then display the content…
A: As the programming language is not mentioned so I am writing a code in C++ language. If you want a…
Q: z=0 i=2 x=int(input("Enter any number") while i<=n: z=z+i/i+2 print(z) i=i+1 for the above program,…
A: Code: z=0i=2x= int(input("enter any number"))#reading user input#while loopwhile i<=x:…
Q: 2)If a five-digit number is input through the keyboard, write a program to print a new number by…
A: Below is the C++ code. Approach of Program: Include a necessary header files and use a namespace to…
Q: program that will print countdown from 10 to 1 and will print HAPPY NEW YEAR after
A: Please find the answer below :
Q: (Find the two lowest scores) Write a program of C++ that prompts the user to enter the number of…
A: Actually, c++ is a powerful general purpose language.
Q: (Converting Fahrenheit to Celsius) Write a program that converts integer Fahrenheit temperatures…
A: Since the programming language is not mentioned, I have coded this using C language.
Q: Q7. If you have the following statements: int main() int a=10, b; b=++a + a; cout<<b<<","<<++a;…
A: #include <iostream>using namespace std; int main(){ int a=10, b; b=++a + a;…
Q: Start D=0, E=5 E=E+D i=1,5,3 D=i+3*E E j=7,3,-2 j mod3) 0 E=E+2*j E/9, D D=D+3*i+j End
A: Python Code for above flow chart :- D=0E=5for i in [1,5,3]: D=i+3*E for j in [7,3,-2]:…
Q: Create a program to accept 4 numbers and identify the second highest number.
A: #include <iostream> using namespace std; int main(){ int ar[4], max, second; int i;…
Q: Q1/ Write a program to enter an integer and displays whether the integer is an odd number or not?
A: Actually, program is a executable software that runs on a computer.
Q: 3. Display a decimal number and then display it rounded and truncated. Use a number where rounded…
A: decimal number- Select To_Number(456.78) from dual; round- Select ROUND(15.188,1) "Round" From Dual;…
Q: 12. Ask for a number then get the sum from 1 until the entered no. Enter a number: 3 e.g. Answer is…
A: Editable C code:- #include <stdio.h>int main() { int n, i, sum = 0; printf("Enter a…
Q: Complete a program for counting digits and displaying their total count at the end of the program }
A: Complete code: #include <iostream>using namespace std;int main(){int n;int digits = 0;cin…
Q: 6. Create a program that will convert: 6.1 Degree Fahrenheit to degree celsius and vice versa.
A: Since you have asked multiple questions we will answer the first one only. If you want any specific…
Q: Create IPO chart, flowchart and pseudocode for a program that prints all prime numbers
A: First of all you need to know What is a prime number? A Prime Number is a number which is only…
Q: Q4) Write a program to enter a number from the keyboard, then check: -if the number is bigger than…
A: In this code, the number is entered by the user and correspondingly the number is checked according…
Q: Q6) Write the code of VB program to find the summation of even numbers and odd numbers separately by…
A: Steps to create the Form window in Visual Basic. Open Microsoft visual basic .NET application…
Q: 1- If money is left in a particular bank for more than 5 years, the bank pays interest at a rate of…
A: The C programming language is a computer programming language that was developed to do system…
Q: 2. Randomly generate an integer number in range [100, 999]. (a) Check if this number is even or odd,…
A: According to the Question below the solution: Output:
Q: 1- The integers from 100 down to 0 by fives; that is, the first three lines should be 100, 95, 90,…
A: The program used the for loop to print the numbers fro 100 to 0 multiples of 5. For loop starts from…
Q: 3. Create a program that will ask the user to enter two numbers. If the first number is greater than…
A: To print if the the first number is greater than the second number using if-else condition.…
Q: Q2) Write a program to calculate the average of the semester. To find the average of the semester,…
A: import java.util.*;public class Main{ public static void main(String[] args) { int a=0,b=0,c,d;…
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Step by step
Solved in 4 steps with 2 images
- Q4: (Find the two lowest scores) Write a program that prompts the user to enter the number of students and each student’s name and score, and finally displays the student with the lowest score and the student with the second-lowest score.5-9) (Find the two highest scores) Write a program that prompts the user to enter the number of students and each student’s name and score, and finally displays the student with the highest score and the student with the second-highest score.5-8) (Find the highest score) Write a program that prompts the user to enter the number of students and each student’s name and score, and finally displays the name of the student with the highest score.
- Question # 4: Write a program that calculates the electricity bill. The rates of electricity per unit are as follows: If the units consumed are 300 and 8 2000 2750 Question # 6: Write a program that converts the angle from degree to radian and displays each value.((3)/(4)+(9)/(10)m)+0 where (3)/(4)+(9)/(10)m!=0 expression is undefined, enter ( O)/( a)s your answer.Q1: Write a program that reads 10 numbers and then finds the largest number and prints it and finds the smallest number and ey
- (Display Magic Numbers) Display the first N magic numbers, where N is a positive number that the user provides as input. Here, a magic number is a number whose sum of its digits eventually leads to 1. For example, 1234 is a magic number because 1 + 2 + 3 + 4 = 10 and 1 + 0 = 1, while 1235 is not (1 + 2 + 3 + 5 = 11 and 1 + 1 = 2). Write a program that prints out the first N magic numbers, seven on each line. Here is the sample output: You are required to use the following function prototype: bool isMagic(int value); // Returns true if value is a magic number The outline of this function will be as follows: Step 1: Calculate the sum of digits of value Step 2: Repeat Step 1 until we get a single digit Step 3: If the resulting sum is equal to 1 then it is a magic number, otherwise not(Find future dates) Write a program that prompts the user to enter an integer for today’s day of the week (Sunday is 0, Monday is 1, …, and Saturday is 6). Also prompt the user to enter the number of days after today for a future day and display the future day of the week.Question # 8: Write a program that inputs a number and checks whether it is a perfect number or not. A perfect number is the number that is numerically equal to the sum of its divisors. For example, 6 is a perfect number because the divisors of 6 are 1, 2, 3 and 1+2+3=6
- 22. One metric ton is approximately 2,205 pounds. Write a program that prompts the user to input the amount of rice, in pounds, a bag can hold. The program outputs the number of bags needed to store one metric ton of rice.Max 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.(Average speed in miles) Assume that a runner runs 15 kilometers in 50 minutesand 30 seconds. Write a program that displays the average speed in miles per hour.(Note that 1 mile is 1.6 kilometers.)