Answer:
Here is the C program:
#include <stdio.h> //to use input output functions
//functions prototype
unsigned int mod(unsigned int a, unsigned int b);
unsigned int mul(unsigned int a, unsigned int b);
unsigned int sub( unsigned int a,unsigned int b);
float divide(unsigned int a,unsigned int b);
unsigned int add( unsigned int a,unsigned int b);
int main() { //start of main method
unsigned int a, b; //declare variables to store the operands
char d; //declare variable to store the operator
printf("Enter an operator: "); //prompts user to enter an operator
scanf("%c",&d); //reads the operator from use
getchar(); //gets a character
while (d!='q') { //keeps iterating until user enters q to quit
printf("Enter 1st operand: "); //prompts user to enter first operand
scanf("%d",&a); //reads first operand from user
getchar(); //reads character
printf("Enter 2nd operand: "); //prompts user to enter second operand
scanf("%d",&b); //reads second operand from user
getchar();
if (d=='%') { //if the character of operator is a mod
printf("%d",a); //prints operand 1
putchar(d); //displays operator
printf("%d",b); //displays operand 2
printf(" = "); //displays =
mod(a,b); } //displays computed modulo of two input operands
if (d=='*') //if the input character is for multiplication operator
{printf("%d",a); //prints operand 1
putchar(d); //displays operator
printf("%d",b); //displays operand 2
printf(" = "); //displays =
mul(a,b); } //displays computed multiplication
if (d=='+') { //if the input character is for addition operator
printf("%d",a); //prints operand 1
putchar(d); //displays operator
printf("%d",b); //displays operand 2
printf(" = "); // displays =
add(a,b); } //displays computed addition
if (d=='/') { //if the input character is for division operator
printf("%d",a); // prints operand 1
putchar(d); //displays operator
printf("%d",b); //displays operand 2
printf(" = "); //displays =
divide(a,b); } //displays computed division
if (d=='-') { //if the input character is for subtraction operator
printf("%d",a); //prints operand 1
putchar(d); //displays operator
printf("%d",b); // displays operand 2
printf(" = "); //displays =
sub(a,b); } //displays computed subtraction
printf("Enter an operator: "); //asks again to enter an operator
scanf("%c",&d); //reads operator from user
getchar(); } } //gets character
unsigned int mod( unsigned int a, unsigned int b){ //function to compute modulo of two integers with no sign
int c = a%b; //computes mod
printf("%d",c); } //displays mod result
unsigned int add(unsigned int a, unsigned int b){ // function to compute addition of two integers
int c = a+b; //computes addition
printf("%d\n",c); } //displays result of addition
unsigned int mul(unsigned int a, unsigned int b){ //function to compute multiplication of two integers
int c = a*b; //multiplies two integers
printf("%d\n",c); } //displays result of multiplication
float divide(unsigned int a, unsigned int b){ //function to compute division of two integers
float c = a/b; //divides two integers and stores result in floating point variable c
printf("%f\n",c); } //displays result of division
unsigned int sub(unsigned int a, unsigned int b){ //function to compute subtraction of two integers
int c = a-b; //subtracts two integers
printf("%d\n",c); } //displays result of subtraction
Explanation:
The program is well explained in the comments mentioned with each line of the program. The program uses while loop that keeps asking user to select an operator and two operands to perform arithmetic calculations. The if conditions are used to check what arithmetic calculation is to be performed based on user choice of operand and calls the relevant function to perform calculation. There are five functions that perform addition, modulo, subtraction, division and multiplication and display the result of computation. The screenshot of output is attached.
What are the operating system roles?
Answer:
keep track of data,time
its the brain of the computer
You've been hired by Maple Marvels to write a C++ console application that displays information about the number of leaves that fell in September, October, and November. Prompt for and get from the user three integer leaf counts, one for each month. If any value is less than zero, print an error message and do nothing else. The condition to test for negative values may be done with one compound condition. If all values are at least zero, calculate the total leaf drop, the average leaf drop per month, and the months with the highest and lowest drop counts. The conditions to test for high and low values may each be done with two compound conditions. Use formatted output manipulators (setw, left/right) to print the following rows:________.
September leaf drop
October leaf drop
November leaf drop
Total leaf drop
Average leaf drop per month
Month with highest leaf drop
Month with lowest leaf drop
And two columns:
A left-justified label.
A right-justified value.
Define constants for the number of months and column widths. Format all real numbers to three decimal places. The output should look like this for invalid and valid input:
Welcome to Maple Marvels
------------------------
Enter the leaf drop for September: 40
Enter the leaf drop for October: -100
Enter the leaf drop for November: 24
Error: all leaf counts must be at least zero.
End of Maple Marvels
Welcome to Maple Marvels
------------------------
Enter the leaf drop for September: 155
Enter the leaf drop for October: 290
Enter the leaf drop for November: 64
September leaf drop: 155
October leaf drop: 290
November leaf drop: 64
Total drop: 509
Average drop: 169.667
Highest drop: October
Lowest drop: November
End of Maple Marvels
Answer:
#include <iostream>
#iclude <iomanip>
#include <algorithm>
using namespace std;
int main(){
int num1, num2, num3,
int sum, maxDrop, minDrop = 0;
float avg;
string end = "\n";
cout << " Enter the leaf drop for September: ";
cin >> num1 >> endl = end;
cout << "Enter the leaf drop for October: ";
cin >> num2 >> endl = end;
cout << "Enter the leaf drop for November: ";
cin >> num3 >> endl = end;
int numbers[3] = {num1, num2, num3} ;
string month[3] = { "September", "October", "November"}
for ( int i =0; i < 3; i++) {
if (numbers[i] < 0) {
cout << "Error: all leaf counts must be at least zero\n";
cout << "End of Maple Marvels\n";
cout << "Welcome to Maple Marvels";
break;
} else if (number[i] >= 0 ) {
sum += number[i] ;
}
}
for (int i = 0; i < 3; i++){
cout << month[i] << " leaf drop: " << numbers[i] << endl = end;
}
cout << "Total drop: " << sum << endl = end;
cout << setprecision(3) << fixed;
cout << "Average drop: " << sum / 3<< endl = end;
maxDrop = max( num1, num2, num3);
minDrop = min(num1, num2, num3);
int n = sizeof(numbers)/sizeof(numbers[0]);
auto itr = find(number, number + n, maxDrop);
cout << "Highest drop: "<< month[ distance(numbers, itr) ] << endl = end;
auto itr1 = find(number, number + n, minDrop);
cout << "Lowest drop: " << month[ distance(numbers, itr1) ] << endl = end;
cout << "End of Maple Marvels";
Explanation:
The C++ source code above prompts for user input for three integer values of the leaf drop count through the September to November. The total drop, average, minimum and maximum leaf drop is calculated and printed out.
Using the Multiple-Alternative IFTHENELSE Control structure write the pseudocode to solve the following problem to prepare a contract labor report for heavy equipment operators: The input will contain the employee name, job performed, hours worked per day, and a code. Journeyman employees have a code of J, apprentices a code of A, and casual labor a code of C. The output consists of the employee name, job performed, hours worked, and calculated pay. Journeyman employees receive $20.00 per hour. Apprentices receive $15.00 per hour. Casual Labor receives $10.00 per hour.
Answer:
The pseudo-code to this question can be defined as follows:
Explanation:
START //start process
//set all the given value
SET Pay to 0 //use pay variable that sets a value 0
SET Journeyman_Pay_Rate to 20//use Journeyman_Pay_Rate variable to sets the value 20
SET Apprentices_Pay_Rate to 15//use Apprentices_Pay_Rate variable to sets the value 15
SET Casual_Pay_Rate to 10//use Casual_Pay_Rate variable to set the value 10
READ name//input value
READ job//input value
READ hours//input value
READ code//input value
IF code is 'J' THEN//use if to check code is 'j'
COMPUTE pay AS hours * JOURNEYMAN_PAY_RATE//calculate the value
IF code is 'A' THEN//use if to check code is 'A'
COMPUTE pay AS hours * APPRENTICES_PAY_RATE//calculate the value
IF code is 'C' THEN//use if to check code is 'C'
COMPUTE pay AS hours * CASUAL_PAY_RATE//calculate the value
END//end conditions
PRINT name//print value
PRINT job//print value
PRINT code//print value
PRINT Pay//print value
END//end process
Jason works as a financial investment advisor. He collects financial data from clients, processes the data online to calculate the risks associated with future investment decisions, and offers his clients real-time information immediately. Which type of data processing is Jason following in the transaction processing system?
A.
online decision support system
B.
online transaction processing
C.
online office support processing
D.
online batch processing
E.
online executive processing
Answer:
The answer to this question is given below in the explanation section.
Explanation:
The correct answer to this question is an online decision support system. Because the decision support systems process the data, evaluate and predict the decision, and helps the decision-makers, and offer real-time information immediately in making the decision in an organization. So the correct answer to this question is the decision supports system.
Why other options are not correct
Because the transaction processing system can only process the transaction and have not the capability to make the decision for the future. Office support processing system support office work, while the batch processing system process the task into the batch without user involvement. however, online executive processing does not make decisions and offer timely information to decision-makers in an organization.
Answer: the answer is A.
Explanation: He has to listen to what the people tell him and think about the information he has and make a choice on what to reply with.
What are the benefits of computer?
Answer:
online toutoring.
helpful games give mind relaxation.
A ________helps to present data in a row and column format.
Answer:
Tally marks
Explanation:
Tally marks on the Tally table can help us to represent data in a row and column format.
If my answer helped, kindly mark me as the Brainliest!!
Thank You!!
Jason works as a financial investment advisor. He collects financial data from clients, processes the data online to calculate the risks associated with future investment decisions, and offers his clients real-time information immediately. Which type of data processing is Jason following in the transaction processing system?
A.
online decision support system
B.
online transaction processing
C.
online office support processing
D.
online batch processing
E.
online executive processing
Answer:
The answer to this question is given below in the explanation section.
Explanation:
The correct answer to this question is online decision support system. Because the decision support systems process the data, evaluate and predict the decision, and helps the decision-makers, and offer real time information immediately in making the decision in an organization. So the correct answer to this question is the decision supports system.
Why other options are not correct
Because the transaction processing system can only process the transaction and have not the capability to make the decision for the future. Office support processing system support office work, while the batch processing system process the task into the batch without user involvement. however, online executive processing does not make decisions and offer timely information to decision-makers in an organization.
The fraction 460/7 is closest to which of the following whole numbers?
Create a survey questionnaire with at least 10 questions to find out how teens are using social networking sites. Your data should contain a minimum of 30 valley questionnaires in each respondent must answer all the questions for that questionnaire to be valid. Analyze the data collected using charts or graphs. What are your findings from the survey? Collate the findings by summarizing the answers for each question. Present a graph or chart to represent the data you collected.
Possible Questions:
- What social media platforms do you use on a daily basis?
- Where did you hear about these social media platforms?
- What made you join these social media platforms?
- What social media platform(s) do you prefer the most?
- Why might you suggest these social media platforms to a friend?
- What does having and using this platform mean to you?
- What does your preferred platform allow you to do?
- Has using this platform changed you in any way? (Are you more connected, concerned, aware, etc.)
What are two examples of items in Outlook?
a task and a calendar entry
an e-mail message and an e-mail address
an e-mail address and a button
a button and a tool bar
Answer:
a task and a calendar entry
Explanation:
ITS RIGHT
Answer:
its A) a task and a calendar entry
Explanation:
correct on e2020
Write code that Uses the range() in a for loop to iterate over the positions in user_names in order to modify the list g
Answer:
Explanation:
The range() function is a built-in function in the Python programming language. In the following code, we will use this function to iterate over all the positions in the array called user_names and add them to the list g. (assuming that is what was meant by modifying the list g)
for i in range( len(user_names) ):
g.append(user_names[i])
This simple 2 line code should do what you are asking for.
IT professionals have a responsibility to educate employees about the risks of hot spots. Which of the following are risks associated with hot spots? Check all of the boxes that apply.
third-party viewing
unsecured public network
potential for computer hackers
unauthorized use
Answer:
All of them
Explanation:
got it right on edge 2020
Answer:
All of the above
Explanation:
just do it
QUICK!! URGENT!! I'll provide more point if u give me the right code for this specific program. I truly don't understand if statements :(
Answer:
5467373737474737377474747
21. Duplicating a layer merges all of the layers and discards anything that is
not visible. True or False
True
False
True or false? The following deterministic finite-state automaton recognizes the set of all bit strings such that the first bit is 0 and all remaining bits are 1’s.
Answer:gjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
Explanation:
4.3 Code Practice: Question 2
Write a program that uses a while loop to calculate and print the multiples of 3 from 3 to 21. Your program should print each number on a separate line.
(Python)
i = 3
while i <= 21:
if i % 3 == 0:
print(i)
i += 1
The required program written in python 3 is as follows :
num = 3
#initialize a variable called num to 3
multiples_of_3 = []
#empty list to store all multiples of 3
while num <=21 :
#while loop checks that the range is not exceeded.
if num%3 == 0:
#multiples of 3 have a remainder of 0, when divided by 3.
multiples_of_3.append(num)
#if the number has a remainder of 0, then add the number of the list of multiples
num+=1
#add 1 to proceed to check the next number
print(multiples_of_3)
#print the list
Learn more :https://brainly.com/question/24782250
Java Eclipse Homework JoggerPro
Over a seven day period, a jogger wants to figure out the average number of miles she runs each day.
Use the following information to create the necessary code. You will need to use a loop in this code.
The following variables will need to be of type “double:”
miles, totalMiles, average
Show a title on the screen for the program.
Ask the user if they want to run the program.
If their answer is a capital or a lowercase letter ‘Y’, do the following:
Set totalMiles to 0.
Do seven times (for loop)
{
Show which day (number) you are on and ask for the number of miles for this day.
Add the miles to the total
}
Show the total number of miles
Calculate the average
Show the average mileage with decimals
Use attractive displays and good spacing.
Save your completed code according to your teacher’s directions.
import java.util.Scanner;
public class JoggerPro {
public static void main(String[] args) {
String days[] = {"Monday?", "Tuesday?", "Wednesday?", "Thursday?","Friday?","Saturday?","Sunday?"};
System.out.println("Welcome to JoggerPro!");
Scanner myObj = new Scanner(System.in);
System.out.println("Do you want to continue?");
String answer = myObj.nextLine();
if (answer.toLowerCase().equals("y")){
double totalMiles = 0;
for (int i =0; i < 7; i++){
System.out.println(" ");
System.out.println("How many miles did you jog on " + days[i]);
double miles = myObj.nextDouble();
totalMiles += miles;
}
double average = totalMiles / 7;
System.out.println(" ");
System.out.println("You ran a total of " + totalMiles+ " for the week.");
System.out.println(" ");
System.out.println("The average mileage is " + average);
}
}
}
I'm pretty sure this is what you're looking for. I hope this helps!
what is a conditional format that displays a horizontal gradient or solid fill indicating the cell's relitive value compared to other selected cells
Answer:
Data bar
Explanation:
The answer to this question is data bar. Through the use of a day bar we are able to see trends in our data. They are very useful when it comes to visualization of values that are In a range of cells. Now if the bar is longer then the value we are visualizing is definitely higher. And if it is shorterr the value is lower. Several applications like excel has programmes that makes use of data bars especially for statistical purposes.
Walter The Dog is hot
(This was a waste of 37 points lol)
Answer:
no
Explanation:
mabey yes
Write a program that simulates flipping a coin to make decisions. The input is how many decisions are needed, and the output is either heads or tails. Assume the input is a value greater than 0.
Answer:
import random
decisions = int(input("How many decisions: "))
for i in range(decisions):
number = random.randint(0, 1)
if number == 0:
print("heads")
else:
print("tails")
Explanation:
*The code is in Python.
import the random to be able to generate random numbers
Ask the user to enter the number of decisions
Create a for loop that iterates number of decisions times. For each round; generate a number between 0 and 1 using the randint() method. Check the number. If it is equal to 0, print "heads". Otherwise, print "tails"
Write code that read from variables N and M, multiply these two unsigned 32-bit variables and store the result in Variables P, Q. (
Answer:
Using C language;
#include <stdio.h>
int main()
{
int N, M;
printf("Please enter two numbers: ");
scanf("%d %d", &N, &M);
int P,Q = N*M;
return 0;
}
Explanation:
The variables N and M are declared and the "scanf" function is used to assign a value to the variables from the input prompt, then the product of N and M are saved to the P and Q variables.
what is the importance of human flourishing to science and technology?
Explanation:
:*):*):*)*)*:)*:)*:*)*:**:*)*:)*:)*:*):*)*P:)*:*):*)
:*
):*
)*:
)*:*
):*):*)*:*):*)*:*):*):*):)*:*):*):*):*)
:*):*)
Kara's teacher asked her to create a chart with horizontal bars. Which chart or graph should she use?
Bar graph
Column chart
Line graph
Pie chart
Answer:
The answer to this question is given below in the explanation section.
Explanation:
The correct answer to this question is the Bar graph.
Because we use this chart type to visually compare values across a few categories when the charts show duration or when the category text is long.
However, we can present information similarly in the bar graph and in column charts, but if you want to create a chart with the horizontal bar then you must use the Bar graph. In an Excel sheet, you can easily draw a bar graph and can format the bar graph into a 2-d bar and 3-d bar chart.
A column chart is used to compare values across a few categories. You can present values in columns and into vertical bars.
A line graph chart is used to show trends over months, years, and decades, etc.
Pie Chart is used to show a proportion of a whole. You can use the Pie chart when the total of your numbers is 100%.
Answer:
Bar graph option A
Explanation:
I did the test
This diagram shows a number of computing devices connected to the Internet with each line representing a direct connection.
What is the MINIMUM number of paths that would need to be broken to prevent Computing Device A from connecting with Computing Device E?
A. 1
B. 2
C. 3
D. 4
Answer: C
Explanation: Computing Device A is connected using 3 wires, which all lead to multiple different paths of wires. If you break all the wires off of A, it leaves it with no paths to use. However, if you do this with E, there is 4 differents paths connected to it. Since you need the MINIMUM, the answer would be C.
China is selling school supplies in the United States for very low prices, even lower than the
preventing prices in China, and thus making it extremely difficult for American manufacturers to
compete. This is referred to as
Answer:
dumping.
Explanation:
dumping. China is selling school supplies in the United States for very low prices, even lower than the prevailing prices in China, and thus making it extremely difficult for American manufacturers to compete. This is referred to as DUMPING.
What is the proper syntax for writing a while loop in Python?
A. Begin the statement with the keyword repeat
B. End the statement with a colon
C. Place the test condition outside of parentheses
D. Use quotation marks around the relational operators
The proper syntax for while loops in Python are:
while (condition):
#the code does something
Answer choice B is the only correct option because all while loops end with a colon.
Answer:
End the statement with a colon
Explanation:
I took the test and got it right.
Write code that prints: Ready! numVal ... 2 1 Start! Your code should contain a for loop. Print a newline after each number and after each line of text Ex: numVal
Answer:
Written in Python
numVal = int(input("Input: "))
for i in range(numVal,0,-1):
print(i)
print("Ready!")
Explanation:
This line prompts user for numVal
numVal = int(input("Input: "))
This line iterates from numVal to 1
for i in range(numVal,0,-1):
This line prints digits in descending order
print(i)
This line prints the string "Ready!"
print("Ready!")
Need help with coding.
I'm trying to input a list that uses int(input("Element: ")) and it's causing an error. Anything to help with this?
You could try something likes this.
lst = []
n = int(input("Number of elements: ))
for i in range(0, n):
element = int(input("Element: "))
lst.append(element)
What is the Intranet?
Answer:
a local or restricted communications network, especially a private network created using World Wide Web software.
Explanation:
the intranet is in private Network based on internet standards but only available within a business or other organization.
Write a program that asks the user to enter a 10-character telephone number in the format XXX-XXX-XXXX. The application should display the telephone number with any alphabetic characters that appeared in the original translated to their numeric equivalent. For example, if the user enters 555-GET-FOOD, the application should display 555-438-3663.
In python:
number = input("Enter a 10-character phone number: ")
for i in number:
if i.isalpha():
if i == "A" or i == "B" or i == "C":
i = "2"
elif i == "D" or i == "E" or i == "F":
i = "3"
elif i == "G" or i == "H" or i == "I":
i = "4"
elif i == "J" or i == "K" or i == "L":
i = "5"
elif i == "M" or i == "N" or i == "O":
i = "6"
elif i == "P" or i == "Q" or i == "R" or i == "S":
i = "7"
elif i == "V" or i == "T" or i == "U":
i = "8"
elif i == "W" or i == "X" or i == "Y" or i == "Z":
i = "9"
print(i, end="")
I hope this helps!
Code:
def phonenumber():
alpha = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
n =[2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7,7,8,8,8,9,9,9,9]
phone = input('Enter phone number in format of XXX-XXX-XXXX : ').upper()
index = 0
for index in range(len(phone)):
if phone[index].isalpha():
print (n[alpha.index(phone[index])], end = ' ')
else:
print (phone[index], end = ' ')
phonenumber()
Compilation output is attached below:
Learn More:https://brainly.com/question/15687460