Task 1: Create a program that accepts a number and determine the factor of the number. Display the factor of the number. Use input function, output function, variable, data types, arithmetic operators, relational operators, decision structure and goto statement.
Q: The number of source-level statements and the total number of I/O operations are both recorded in…
A: A program's input/output statements: Often known as IO statements, tell computers how to read and…
Q: A small code that returns the average earning of all employees
A: In the program, a function named average is created to return the average earning of all employees.…
Q: Write a multiple assignment statement that can be used instead of the followinggroup of assignment…
A: GIVEN: Write a multiple assignment statement that can be used instead of the followinggroup of…
Q: Which of the following outputs data in a program A The assignment statement B The print…
A: output statements helps in displaying output to screen.
Q: C++ please! Suppose you have a certain amount of money in a savings account that earns compound…
A: Start Input principal amount Input rate of interest Input the term Calculate final amount Print…
Q: Procedure: Write a program to simulate a simple calculator to execute the operations: +, -, * , / ,…
A: Note: since your question contain multiple question but we can answer only one at a time. so, please…
Q: 1. Ask the user their age 2. Capture the value of the age variable from keyboard input than 21,…
A: Please find the answer below :
Q: 5.) Create a flowchart to compute and display the gross pay and net pay by taking employee number,…
A: I give the flowchart , algorithm ,code in c++ along with output and code screenshot
Q: Q.1 - manufacturer wishes to determine the cost of producing an open-top cylindrical container. The…
A: #include <stdio.h> int main() { //declaring variables float…
Q: Question 3) Write a program that perfoms all arithmetic operations using switch statement by taking…
A: EXPLANATION - A program is created . Create a variable of type character to take choice as an…
Q: C. Assume that we execute the following assignment statements: width = 17 height = 12.0 delimiter =…
A: This question comes from Python Programming which is a part of computer science. Let's discuss it in…
Q: Q: A Dam in Iraq is discharging water quantities daily as shown in the the manager of the dam…
A: We need to create a vector with given data and plot the required data .
Q: C++ Which function is used to check whether a character is a number? a) isalpha() b) isalnum()…
A: Given, Choices: isalpha() isalnum() isdigit() isblank() We have to find which function is…
Q: 4. Assume that we execute the following assignment statements: width = 17 height = 12.0 For each of…
A: Solution :: Python code :: width=17 height=12.0 print("width",width/2,"type",type(width/2))…
Q: 3. Which of the following is called address operator? * (e- b) & c) _ d) %
A: There is only a single operator that is used as the address operator. It is known as address…
Q: Develop a program that will accept three integers from the user and displays the smallest and…
A: #include<iostream> using namespace std; int main(){ int a,b,c,least,greatest; cout…
Q: question 1 part a (Write only one line code, no need of header files or any other statement just…
A: Answer :-- c=++b*a
Q: Teacher has prepared the result of a class containing n number of students. He wants to give the…
A: C++ programming language is an object-oriented programming language, that's used to develop mobile…
Q: 1. DRAW a flowchart that will compute for the midterm grade of a student. The midterm grade is equal…
A: Given: FLOWCHARTING EXERCISES 1. DRAW a flowchart that will compute for the midterm grade of a…
Q: EXERCISE 26 Write functions which respectively calculate the sum, product, minimum, maximum, average…
A: NOTE - As per our guideline we can solve only one question, so please repost other parts as a…
Q: 2- Write a programC++ to receive an arithmetic operator and two integers, the program performs the…
A: code:-- #include <iostream>using namespace std; // function to calculate the arithmatic…
Q: You are requested to write a very simple calculator. Your calculator should be able to handle the…
A: Program: #include<bits/stdc++.h> using namespace std; int main() { double var1,var2;…
Q: Write a Python code for the following: • Ask the user to enter a Number, N • Display the summation…
A: Start Input N Convert N into integer using int() function Declare sum = 0 and count = 1 while…
Q: • Read from the user the number of cities (minimum 6 cities.) • For each city: city name and the…
A: given data
Q: Please use C++ and Only Use Selection Statements PROBLEM: Consider the elevator in the Faculty of…
A: I have provided C++ CODE along with CODE SCREENSHOT and TWO OUTPUT…
Q: 1. Please explain what kind of syntax errors or problems the following statements might have. 1=x;…
A: Ans:) NOTE: As per the answering guideline we can solve only the first answer in case of multiple…
Q: 05) write algorithm and draw flowchart for the problem: Read two numbers and find subtraction two…
A: Algorithm: Step 1: Start. Step 2: Read two numbers from the user suppose x and y. Step 3: Perform…
Q: 3. Which of the following is called address operator? a) * b) & c) _ d) %
A: In this question, we are asked the name of address operator. Which one is used as address operator…
Q: Create the equivalent of a four-function calculator. The program should ask the user to enter a…
A: Algorithm: 1. Input first number,operator,second number 2. Use switch case for performing arithmetic…
Q: A company has 45 employers, 25 work as system developers (D) and (N) work as sales representer while…
A: Below is the flowchart:
Q: 1 %Define variables a, b, c, and d 2 a - 2.2; 3 b - 5.1; 4 C - -3.1; 5 d - 1.8; 6 7 %Enter commands…
A: Step 1: Initialize the variables a, b, c and d. Step 2: Find the product of b and c and add it with…
Q: Exercise 5: Write a C++ program that prompts the user to enter two numeric values; it will determine…
A: Code: #include <iostream>using namespace std; int main () { // Local variable declaration:…
Q: QUESTION 2 Create a program that will assist a user in determining the following criteria of a…
A: To write C++ program to find square, square root and check whether the given number is even or odd.
Q: Which of the following statements is not true? Select one: O a. Using function can make a program…
A: According to the Question below the Solution:
Q: CHALLENGE 3.1.2: Reading multiple data types. ACTIVITY Type two statements. The first reads user…
A: Coded using Python 3.
Q: Using C Write statements that take a whole data line as input and display all the uppercase…
A: #include <stdio.h>#define MAX 100int main(){ int i; char str[MAX]; printf("Enter a…
Q: Following is a problem statement. Which of the below is the correct trace table for the problem…
A:
Q: QUESTION 2 Write one line of code ONLY. Print the value of gpa and its data type in two separate…
A: Step-1: Start Step-2: Declare a variable gpa with value 99.99 Step-3: Print the value of gpa Step-4:…
Q: 3. Which of the following is called address operator? a) * b) & c)_ d) %
A: Answer :- option B) &
Q: 1. Start your program with the correct comments indicating your authorship, the assignment number…
A: Hello Student. Greetings from my side. Hope you are doing great. I will try my best to answer your…
Q: Complete the following Questions of SAS Program: The PROC CONTENTS procedure lists out what…
A: Code is below
Q: 6. See the following running program to display a sequence of numbers. Which variable do you think…
A: To display a sequence numbers, three variables are necessary. One is used to store the first number…
Q: Using C++ Write a program that will receive two integer items from an operator and display to the…
A: Here, first you need to declare 2 variables for two integers, 4 variables for sum, difference,…
Q: TASK NO. 1: Write a program to assign float value, integer value and your name to the variables…
A: Hey, since there are multiple questions posted, we will answer first question. If you want any…
Q: Project 2: Truth Table: Write a program that displays the truth table for a proposition with two…
A: Code: #include<iostream>using namespace std; char getValue(int f){ return (f)?'T':'F';}int…
Q: What value will be assigned to the numeric variable x when the following statement is executed x 4 \…
A: In this program, we have an statement x= 4 / 2 *4 Found out the output value of x. As the language…
Q: two basic blocks of code
A: Given :- In the above question, the statements or instruction is mention in the above given question…
Step by step
Solved in 3 steps with 1 images
- YOUR QUESTION IS: 1. What value will be assigned to the numeric variable x when the following statement is executed x 4 \ 2 * 4(Modify) a. Modify the program you wrote for Exercise 7 to provide the mass of a person as an output, given his or her weight as an input to the program. Use your program to determine the mass of a person who weighs 140 lbf on Earth. b. Modify the program written for Exercise 7a to also output the person’s weight on Mars and the moon. The pull of gravity on Mars is 12.54ft/sec2=3.728m/s2,andonthemoonis5.33ft/sec2=1.625m/s2.Consider the following statements: Which of the following statements are valid? If they are invalid, explain why. (4) a. volume = box (length, width, height); b. volume = box (length, 3.8, height); c. cout << box(num1, num3, num2) << endl; d. cout << box (length, width, 7.0) << endl; e. volume = box (length, num1, height); f. cout << box(6.2, , height) << endl; g. volume = box (length + width, height) h. volume = box (num1, num2 + num3) ;
- a. Write a program named CheckMonth that prompts a user to enter a birth month. If the value entered is greater than 12 or less than 1, display an error message; otherwise, display the valid month with a message such as 3 is a valid month. b. Write a program named CheckM0nth2 that prompts a user to enter a birth month and day. Display an error message if the month is invalid (not I through 12) or the day is invalid for the month (for example, not between 1 and 31 for January or between I and 29 for February). If the month and day are valid, display them with a message.What is the output of the following code segment?inta=3,b=4;if(a==b);Write(X);Write(Y); X Y XY nothing3)Write a program which prompts the user for their age. If they are 19 or younger inform them that qualify for student discounts. If they are between 20 and 65 inform them that they qualify for no age discounts. If they are 65 or over inform them that they can receive senior discounts. (solution will be Pyhton code,thank you)4)Write a program from decimal to any base, ask the user for a decimal number and convert entered base by user. (Your program should support bases between 2 and 16 .) (solution will be Pyhton code,thank you)
- Write a program using if-blocks that allows the user to input a taxable income value into a text box, and after clicking a button the tax is calculated and displayed in another text box. Write a function to do the tax calculation. The answer should be rounded to 2 decimal places. Your program should calculate the correct tax no matter what the income range. Use an IF-block to make this work.Do this question: Write the following statements in symbolic form using the symbols ~, and and the indicated letters to represent the component statements. 1. DATAENDFLAG is off but ERROR is not equal to 0. (Note: p = the statement “DATAENDFLAG is off,” q= the statement “ERROR equals 0) 2. Either this polynomial has degree 2 or it has degree 3 but not both. (Note: n = “This polynomial has degree 2,” k = “This polynomial has degree 3”)Problem 2 Write a program that lets the user enter an integer number and display its equivalent value in text form. The range of input values should be from -99999 to 99999. Example 1 Enter integer in range [-99999, 99999] -> 100 Expected Output Text equivalence: one hundred Example 2 Enter integer in range [-99999, 99999] -> 5 Expected Output Text equivalence: five Example 3 Enter integer in range [-99999, 99999] -> 1812 Expected Output Text equivalence: one thousand eight hundred twelve Example 4 Enter integer in range [-99999, 99999] -> 44040 Expected Output Text equivalence: forty-four thousand forty Example 5 Enter integer in range [-99999, 99999] -> -10 Expected Output Text equivalence: negative ten In [40]:
- Draw a bar chart of 5 values entered by the user (>=0), where the y-axis is along the rowsand the x-axis is along the columns of the screen (as shown in the figure below).Function Prototype: void barChart(int N1, int N2, int N3, int N4, int N5)Example01:***********************************************************Input:N1=>8 , N2=>6 , N3=>2 , N4=>10 , N5=>910 *09 * *08 * * *07 * * *06 * * * *05 * * * *04 * * * *03 * * * *02 * * * * *01 * * * * *1 2 3 4 5 Example 02:***********************************************************marks: 02Input:N1=>8 , N2=>6 , N3=>0 , N4=>11 , N5=>711 *10 *09 *08 * *07 * * *06 * * * *05 * * * *04 * * * *03 * * * *02 * * * *01 * * * *1 2 3 4 5Example 03:***********************************************************marks: 02Input:N1=>4 , N2=>3 , N3=>1 , N4=>0 , N5=>004 *03 * *02 * *01 * * *1 2 3 4 5Note: Take input in main function.Create the following, in Python: You have a business that cleans floors in commercial space and offices. You charge customers $0.45 per square yard, and some customers require multiple cleanings every month. You need two custom functions for your business. The first function takes a floor's length and width in feet and returns the area in square yards. The second void function takes the area, charge per square yard, and number of monthly cleanings as arguments and prints the cleaning cost. This latter function uses selection (if...else) logic to print different output for single and multiple monthly cleanings (see Sample Outputs). Use a properly named constant for the charge per square yard, too.Hello! Can you please answer the following questions? The example output is attached and the program is in Pyhton. Thank you! program5_2.pyThis program requires a main function and two custom functions about spheres. Both functions take the radius of a sphere as an argument. One function returns the surface area of the sphere. The other void function prints the volume of a sphere to three decimal places. The main function should prompt the user for the radius (as a float) and execute the custom functions. The value returned by the surface area function should be printed accurate to four decimal places. Use the math module to get the value of pi. Formulas for both the surface area and the volume of a sphere are available through an internet search. Input prompts and output should be formatted as in the example output. program5_3.pyThis program should import program5_2 as a module. The main function of program5_3 should prompt the user for the radius (as a float) and execute the…