Question #2 ::: Write a cpp program to add two numbers; defined (num1, num2). If the number addition shows a positive number, then display the multiplication table of 2. If the addition shows a negative number, display a table of even numbers divided by 2. If the number shows 0, end the program with "Error message".
Q: Write a program that reads a series of pairs of numbers as follows: a) Product number b) Quantity…
A: C used to answer this question
Q: Find the two lowest scores) Write a c++ program that prompts the user to enter the number of…
A: #include <iostream>#include <string> using namespace std; int main(){ int numOfStudents,…
Q: Write program in PHP language to take 2 number and find the remainder when a dividing by b.
A: Required:- Write a program in PHP language to take 2 numbers and find the remainder when dividing by…
Q: 5- To print the result of the equation m=x+4d in the program, it is at next figure
A: To display output to the screen in FORTRAN language the print* statement is used. This print*…
Q: Write a simple factorial calculator program. The program should perform the following: Step 1. Ask…
A: Given:
Q: Q5:- Write program to calculate the equation sin(x) y(x) = x* where x = 0. 1,0. 2,0. 3,0. 4
A: #include <iostream>#include<cmath>using namespace std;int main(){ float x,y;…
Q: Write an arithmetic program that includes addition, subtraction, multiplication, and division using…
A: CODE: #include<iostream> using namespace std; int main() { int a, b, n; cout…
Q: :010: Answer the following Question Write a C++ program that displays the results of the expressions…
A:
Q: Write in C language. a). Input two integers from 0-9. Compute their sum, difference, product, and…
A: #include <stdio.h> int main(){ int num1, num2; printf("Enter first number from 0-9:…
Q: + to program a number guessing game.
A: the c++ program is an given below :
Q: 1. Given two numbers X and Y. Write a program to determine the difference between X and Y. If X - Y…
A: “Since you have asked multiple questions, we will solve the first question for you. If you want any…
Q: (b) The following equations are used to calculate the voltage and power of a load in an electric…
A: we take I and R as a output
Q: Write c program that will take two numbers a and b from user and find and display small number from…
A: Given: To write code in C.
Q: Python Assignment Lab 3- 1. Prompt the user to enter two integers x,y and then print the value of…
A: Given: To write a python program that Prompt the user to enter two integers x,y and then print the…
Q: Output Formatting with Numbers and Columns and Loops (with C++) Write a program that converts the…
A: Steps: Print header of a table using tab format specifier. Run for loop from i = 1 to 20 Set…
Q: Draw the flowchart then write the C program using else if. The program reads the salary of one…
A: C Code:#include<stdio.h>void main(){ float sal; printf("Enter the salary");…
Q: Write a program emu8086to display your name nine times using a call and jump or loop statement
A: ; Macro for printing messages printmsg macro msgpush axpush bxpush cxpush dxLEA dx,msg ; Lead the…
Q: Write a simple factorial calculator program. The program should perform the following: Step 1. Ask…
A: Here I have taken a loop to iterate for 5 times. Inside the loop, I have taken input from the user.…
Q: Q1/ Write a program which takes PIN number from the user as input and then verifies his pin. If pin…
A: The given problem is related to creating a program, where the user will input a pint. The pin will…
Q: Q5:- Write program to calculate the equation sin(x) y(x) = x * where x = 0. 1,0. 2,0. 3, 0. 4
A: You have not specified any programming language so, I have used C++ language to write the program.
Q: Must show it in Python: Please show step by step with comments. Please show it in simplest form.…
A: Required: Must show it in Python: Suppose a list contains marks earned in the courses CSE110,…
Q: 1. Write a program that will swap two numbers by just using two variables only. You need to ask for…
A: Given: Programming: C#
Q: 1. If a=1, b=2, and c=3, what are the values of a, b and c at the end of the following program…
A: As per our guidelines we are supposed to answer only one question. Kindly repost other questions as…
Q: (Count positive and negative numbers and compute the average of numbers) Write a program that reads…
A: The C++ program is written where it takes the input from the user and counts the positive and…
Q: Write a program to display the pattern shown # ## ### #### ##### C++ code.
A: Program Approach - Use the essential header files if needed. Define the main function. Use outer…
Q: Q1: Draw the flow chart of a program that returns the sum of the even numbers between 5 and 75.
A: 1) Create a variable sum= 0 ,I=5 2) Run the loop from I=5 to I=75 Check if I is even…
Q: Write a program to display the multiplication table by using while statement
A: The multiplication of numbers is performed by using the * operator. The while loop iterates from i =…
Q: x4 x(2i) Formula 2: Cos (x) = 1 – 2! = E2o(-1)' (2i)! %3D - 4! 6! Notes: (COnSiudi an ait…
A: The question is to write the java code for the given problem.
Q: C program based on the algorithm below Welcome to the temperature conversion program. Please…
A: PROGRAM: //Header files #include <string.h> #include <stdio.h> //Defining the main int…
Q: Write a simple calculator program that use 2 numbers entered by the user to perform any of the…
A: The program uses the Scanner package which is used for taking user inputs during run time. Classes…
Q: Write a program that reads an integer and uses a single variable to add 5 to the integer, multiply…
A: Given :- Write a program that reads an integer and uses a single variable to add 5 to the integer,…
Q: A palindrome is a word or a phrase that is the same when read both forward and backward. Examples…
A: code:- #include <iostream> #include <string> using namespace std; int main() {…
Q: Exercise 4: Write a Python program that displays the times table of a given number. The program asks…
A: Given: Python program that displays n m nxm 7 1 7 7…
Q: C program to take three numbers from user and printing sum of that three numbers
A: HI THERE, I AM ADDING ANSWER BELOWPLEASE GO THROUGH IT THANK YOU
Q: Exercise 4: Write a Python program that asks the user to enter two numbers n and m, then your…
A: PROGRAM STRUCTURE: Takes the value of both the variables. Check the value of the variable if it is…
Q: using C++ program 3. Write a program for comparing two input numbers if which of the two is smaller.…
A: 3. C++ Program that will compare two numbers and display which one is smaller. 4. C++ program that…
Q: Q3a) Summary Newton’s law states that the force, F, between two bodies of masses M1 and M2 is given…
A: Note: since programming language is not mentioned we are providing solution in c++. Part a)…
Q: b. Display imaginary and real term 3. Write an Octave program to a. Read a complex number from the…
A:
Q: [Problem description] Write a program that reads an unspecified number of integer s, and print the…
A: Hello student Greetings Hope you are doing great. Thank You!!!
Q: Procedure: Write a program to simulate a simple calculator to execute the operations: +, -, and p:…
A: Note: As per policy we have to answer one question please post another questions separately program:…
Q: Using a flow chart display a series of numbers in which each number (Fibonacci Number) is the sum of…
A: In Step 2 , I have provided Flowchart image.. In Step 3 , I have provided C++ code along with…
Q: Write a simple factorial calculator program. The program should perform the following: Step 1. Ask…
A: I give the code in java (because you asked in java) along with output screenshot and code…
Q: The value for # can be determined by the series equation: ==4x{1- 1 1 11 7 9 1 1 *13 Write a program…
A: Program description: n is the user input integer variable that stores the number of iterations. math…
Q: Could you help me with this question. This course is Programming 1. This is the question, "A…
A: Question is asking about to calculate the total, subtotal and the sale Tax of the 5 items purchase…
Q: x', x' (CP) The value e can be approximated by the sum 1+x+ + 2! 3! + + n! Write a program that…
A: We need to write a C program to compute exponential series as per the given directions.
Q: C++ Question Write a program for the user to input for any number and then, the program will…
A: C++ Question Write a program for the user to input for any number and then, the program will…
Q: 8. Sum or Difference by Jemar Jude Maranga There are 2 integer inputs, num1 and num2. The program…
A: I have provided C CODE along with CODE SCREENSHOT and 2 OUTPUT SCREENSHOTS
Q: Research current rates of monetary exchange. Draw a flowchart, write pseudocode and C++ to represent…
A: 1 dollar=0.91 Euros 1 dollar=109.46 Japanese yen
Step by step
Solved in 4 steps with 6 images
- Q5: (Count positive and negative numbers and compute the average of numbers) Write a program of C++ that reads an unspecified number of integers, determines how many positive and negative values have been read, and computes the total and average of the input values (not counting zeros). Your program ends with the input 0. Display the average as a floating-point number. Here is a sample run: Enter an integer, the input ends if it is 0: 1 2 -1 3 0 The number of positives is 3 The number of negatives is 1 The total is 5.0 The average is 1.25Write a simple calculator program that use 2 numbers entered by the user to perform any of the following mathematical operations depending on the user’s choice: +,-,*, /, square root. When the program starts a list of mathematical expressions should be appears on top of the screen; the user should enter a number between 1 and 4 to select an operation. The user should then be prompted for the first and second numbers, and finally display the results as shown belowTwin primes are two primes that differ by 2 (e.g., 3 and 5, 101 and 103). Write a ++ program that outputs all twin primes less than 1000 and the total count.
- PROGRAM 6: Three Zero GameWrite an HLA program that reads a number. Then by subtracting off a three and tens, determine if that value ends in a zero or a three. Three such numbers in a row wins the game! Shown below are sample program dialogues to help you build your program. Gimme a number: 20It ends in zero!Keep going...Gimme a number: 53It ends in three!Keep going...Gimme a number: 41Sorry Charlie! You lose the game!Gimme a number: 50It ends in zero!Keep going...Gimme a number: 23It ends in three!Keep going...Gimme a number: 70It ends in zero!You Win The Game! Gimme a number: 51Sorry Charlie! You lose The Game!C++ Programming Exercise: A real estate office handles, say, 50 apartment units. When the rent is, say, $600 per month, all the units are occupied. However, for each, say, $40 increase in rent, one unit becomes vacant. Moreover, each occupied unit requires an average of $27 per month for maintenance. How many units should be rented to maximize the profit? Write a program that prompts the user to enter: a. The total number of of units. b. The rent to occupy all the units. c. The increase in rent that results in a vacant unit. d. Amount to maintain a rented unit. The program then outputs the number of units to be rented to maximize the profit.(Guess the Number) Write a C program that plays the game of “guess the number” as follows: Your program chooses the number to be guessed by selecting an integer at random in the range1 to 1000. The program then types:I have a number between 1 and 1000.Can you guess my number?Please type your first guess.
- Write a program that performs as a very simple calculator. Your calculator should be able to handle the four basic math operations — add, subtract, multiply, and divide — on two input values. Your program should prompt the user to enter three arguments: two double values and a character to represent an operation. If the entry arguments are 35.6, 24.1, and '+', the program output should be The sum of 35.6 and 24.1 is 59.7.Ready program that prompts the user to input two positive numbers A dividend and divisorQuestion 3 Write pseudocode not c program If- else programming exercises 1. Write a C program to find maximum between two numbers. 2. Write a C program to find maximum between three numbers. 3. Write a C program to check whether a number is negative, positive or zero. 4. Write a C program to check whether a number is divisible by 5 and 11 or not. 5. Write a C program to check whether a number is even or odd. 6. Write a C program to check whether a year is leap year or not. 7. Write a C program to check whether a character is alphabet or not. 8. Write a C program to input any alphabet and check whether it is vowel or consonant. 9. Write a C program to input any character and check whether it is alphabet, digit or special character. 10. Write a C program to check whether a character is uppercase or lowercase alphabet. 11. Write a C program to input week number and print week day. 12. Write a C program to input month number and print number of days in…
- 1_ Write a program that reads a character and prints it only if it is 'y' or 'Y' (Simulation of If-Else then structure). 2_Write a program that prints the odd numbers between 1 and 10 using loop (Number 1 ASCII code is 49).Q1: Write a program that reads 10 numbers and then finds the largest number and prints it and finds the smallest number and ey2.37 LAB: Convert from seconds CODE C People find it easier to read time in hours, minutes, and seconds rather than just seconds. Write a program that reads in seconds as input, and outputs the time in hours, minutes, and seconds. Ex: If the input is: 4000 the output is: Hours: 1 Minutes: 6 Seconds: 40 CODE C