C ++ programming Given the code: int a = 6, b= 36; 1. Write a line of code to print 1 if a is an even number.
Q: MATLAB In MATLAB, Compare the usage of the script and function and state their similarities. State ...
A: MATLAB files comes in two types:- SCRIPTS FUNCTIONS Lets compare both of them one by one :- Scrip...
Q: Being a student taking up online courses, how much bandwidth do you recommend for the other online s...
A: We are given a situation where we will try to understand about the bandwidth requirements of a stude...
Q: 2. Consider the following plaintext message. Happy Friday a. What is the corresponding ciphertext if...
A: In this problem we have to study about the cryptography, encryption and decryption and Transposition...
Q: A. Write down the last five digits of your NIM p = B. Calculate x with the following formula: x = p...
A: The solution for the subparts A,B and C is given in the below step:
Q: Distinguish between an attack and a threat.
A: The solution to the given problem is given below.
Q: Compare and contrast massively parallel processing technologies with grid computing.
A: The answer is given below
Q: In this python program please explain every line of this code. Thank you Source Code: print("The f...
A: Python code with each line explanation using comment: # Display the functionprint("The function is f...
Q: please help me write a latex/overleaf code for a table to be used for a weight decision matrix simil...
A: program in next step
Q: The NICE language will now have the data types character and string. Describe how to manipulate the...
A: Introduction: A data type is a collection of data items with a predefined set of operations. Compute...
Q: Using JAVASCRIPT, print the count of all the vowels present in the string "Data Structures and Algor...
A: Write a JAVASCRIPT program to print the count of all the vowels present in the string “Data Structur...
Q: Map the relational schema of Figure 6.14 into an ER schema. This is part of a process known as rever...
A: the answer is an given below :
Q: Write a program that declares an array of size 10.Read 10 integer from user and store them in the ar...
A: Program Explanation:- Using the header file. Using the standard namespace input/output. Define the ...
Q: What does the (break) in the switch statement do?
A: What dose the break statement inside a switch statement: When we use break inside a switch statemen...
Q: Data is transferred from a source to a destination via a network. The data cannot be sent until it h...
A: Networks have made information transmission and sharing easier. The Internet enables us to share inf...
Q: Explain the MIDI port. What functions may a MIDI-enabled system unit carry out?
A: MIDI is an acronym that stands for Musical Instrument Digital Interface. It’s a way to connect devic...
Q: CPU mean a Central Processing Unit and GPU mean Graphics Processing Unit, which one is important in ...
A: What is a CPU?Built from millions of transistors, the CPU can have multiple processing cores and is ...
Q: There is a thief enters a house for robbing purpose. The thief can carry a maximal weight of 60 kg i...
A: The question is to write calculate maximum value of items using 0/1 knapsack problem.
Q: Write a console application that uses at least five (5) different methods of Math class with comment...
A: C# Program: using System; // Using the namespace as MathAppnamespace MathApp{ // Using the class ...
Q: What is wrong with the following syntax? if(pin_code = 1234) printf("\nWelcome!! " ); %3D
A: answer is
Q: What are the main advantages of MapReduce over classic parallel programming techniques like multithr...
A: MapReduce is a programming paradigm that enables massive scalability across hundreds or thousands of...
Q: 04 base 10 to base 2.
A: Ans:- (204)10= (11001100)2
Q: ow to make game calculator with Java (with GUI), condition: standard calculator (include integral, d...
A: Answer import java.awt.*; import javax.swing.*; public class Calculator extends JFrame impl...
Q: Explain why a web server can be considered an end system.
A: Back-end servers are commonly referred to as web servers. Databases are the same way. These servers ...
Q: If the name of a Mongoose model is Student, what is the name of its corresponding collection in the ...
A: mongodb collection is- db.createCollection(student,document) ...
Q: rating system? Is it feasible to explain the ba
A: The definition of an operating system
Q: Based on these parameters, cloud computing distinguishes between two types of coupling: those that a...
A: Introduction: Cloud computing is a computer technology that uses the internet to store and manage da...
Q: Two channels one with a bit rate of 190Kbps and another with a bit rate of 180 Kbps are to be mu
A: The answer is
Q: Write two overloaded functions maximum as per following definition: returns the maximum of two integ...
A: Overloaded functions are those functions that have the same name but they differ with the help o...
Q: Please solve the running time of the problem below. Please show your solution. See attached photo fo...
A: The question is to find the running time for the given code.
Q: Find the max-product and max-min composition of relations R1 and R2 given as follows: 1.0 0.3 0.9 0....
A: Below is the complete solution with explanation in detail for the given question.
Q: Turing machine for UNARY DIVISION with quotient and remainder. Full Steps
A: Turing machine handles a string of 0s and 1s, with 0 represented by the blank symbol.
Q: Java Programming Exercises Q1.Write a program that lets the user to enter a series of Strings from ...
A: This program demonstrate to enter numbers andcalculate sort, shuffle and reverse and displaythe resu...
Q: fileName = input("Enter the file name: ") f = open(fileName, 'r') Continue the code to get the mean...
A: Iterate over the file and keep track of sum and count Finally print mean calculated as sum/count
Q: Being a student taking up online courses, how much bandwidth do you recommend for the other online s...
A: Being a student taking up online courses, how much bandwidth do you recommend for the other online s...
Q: In C/C++, pointers are employed. Why is it that Java doesn't use pointers?
A: Pointer is a variable which can hold the address of another variable Java is very secured and it doe...
Q: What are some successful methods for preventing data loss?
A: Introduction: Maintain a clean and dust-free environment for your PC. If your computer becomes overh...
Q: 3. Minimize the following DFA using Table Filling Algorithm. Show the steps. Draw the minimized DFA....
A: Given DFA contains 5 states that are A, B, C, D and E. Input alphabets={0,1} Initial state=A Set of...
Q: PYTHON CODING A retail company assigns a $5000 store bonus if monthly sales are more than $100,000...
A: First create the function for the store bonus which will take the current sales as the input and wil...
Q: Who is in charge of setting Internet standards, and what is their authority?
A: Introduction: When devices join a network, they must adhere to rules known as the Internet standard....
Q: Linux operating system The executive managers wish to learn how resources will be shared between us...
A: I have answer this question in step 2.
Q: Exercise 1: 6AWT Counter Counter Count Up Count Down Reset
A: JAVA Code: import java.awt.*;import java.awt.event.*;import javax.swing.*; public class Counter exte...
Q: List the truth table of the function F = abc + a’c’.
A: Given F = abc + a'c' The number of variables in F are 3 For 3 variables, there are 8 possible truth ...
Q: Step 1: Write a function that takes as input the following parameters: 1. The gender of the child 2....
A: Note -As per the Bartleby process we have to attempt only one question. Program Explanation- Func...
Q: Examine the order of the Boolean operators in SQ, as well as the strategy for ensuring that operator...
A: INTRODUCTION: BOOLEAN EXPRESSION: A Boolean expression is a programming language that returns a Bool...
Q: True or False " CPU stands for the Central Processing Unit. It is the processing chip that serves as...
A: CPU :- Central processing unit brain of computer
Q: Calculate the results (both binary and hexadecimal values) with calculation step and show the status...
A:
Q: If the tail end of the letter "e" is to be viewed under HPO, where should the tail end be positioned...
A: The tail end of the letter “e” under the HPO, you should put the tail end on the center under the LP...
Q: Why is SQL referred to be an Object-Oriented language?
A: Given: What does it mean to be an Object-Oriented language in SQL? Step number two is to determine w...
Q: In your opinion, what are the two most persuasive reasons in favor of layered protocols? Give specif...
A: We are going to understand why layered protocol is preferred along with the examples.
Q: Discuss the evolution of the internet and its technological underpinning.
A: Internet in simple words means network of networks i.e. connection of large no devices to each other...
C ++
Given the code:
int a = 6, b= 36;
1. Write a line of code to print 1 if a is an even number.
2. Write a line of code to print 1 if b is a multiple of a.
Step by step
Solved in 2 steps
- C++ A company hired 10 temporary workers who are paid hourly and you are given a data file that contains the last name of the employees, the number of hours each employee worked in a week, and the hourly pay rate of each employee. You are asked to write a program that computes each employee’s weekly pay and the average salary of all employees. The program then outputs the weekly pay of each employee, the average weekly pay, and the names of all the employees whose pay is greater than or equal to the average pay. If the number of hours worked in a week is more than 40, then the pay rate for the hours over 40 is 1.5 times the regular hourly rate. Use two parallel arrays: a one-dimensional array to store the names of all the employees (Name) a two-dimensional array of 10 rows and 3 columns to store the number of hours an employee worked in a week (Hrs Worked), the hourly pay rate (Pay Rate), and the weekly pay (Salary). Your program must contain at least the following functions: a…Using c++ Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an inpatient or an outpatient. If the patient was an inpatient, the following data should be entered: The number of days spent in the hospital The daily rate Charges for hospital services (lab tests, etc.) Hospital medication charges If the patient was an outpatient, the following data should be entered: Charges for hospital services (lab tests, etc.) Hospital medication charges Use a single, separate function to validate that no input is less than zero. If it is, it should be reentered before being returned. Once the required data has been input and validated, the program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the inpatient data, while the other function accepts arguments for outpatient data. Both functions should return the total chargesC++ A company hired 10 temporary workers who are paid hourly and you are given a data file that contains the last name of the employees, the number of hours each employee worked in a week, and the hourly pay rate of each employee. You are asked to write a program that computes each employee's weekly pay and the average salary of all the workers. The program then outputs the weekly pay of each employee, the average weekly pay, and the names of all the employees whose pay is greater than or equal to the average pay. If the number of hours worked in a week is more than 40 hours, then the pay rate for the hours over 40 is 1.5 times the regular hourly rate. Use two parallel arrays: a one-dimensional array to store the names of all the employees, and a two-dimensional array of 10 rows and 3 columns to store the number of hours an employee worked in a week, the hourly pay rate, and the weekly pay. Your program must contain at least the following functions—a function to read the data from the…
- C++ Demonstration: Write a program that computes the equivalent resistance of a purely series and purely parallel electric circuit. TEST CASES: If the user inputs a character: Computing for the equivalent resistance A. Series CombinationB. Parallel Combination Enter Choice: B Enter R1: 1 Enter R2: 2 Enter R3: A The value of R3 is not a number. If the user selects “Series Combination” and inputs numbers: Computing for the equivalent resistance A. Series Combination B. Parallel Combination Enter Choice: A Enter R1: 1 Enter R2: 2 Enter R3: 3 The total resistance in series is 6 Ohms.In C programming language, if the first and the second operands of operator + are of types int and float, respectively, the result will be of type A. int B. float C. char D. long intint y=0,i; for (int i=0;i<10;++i) y+=i; 36 66 45 55
- JAVA Programming Problem 2 - Diving In the sport of diving, seven judges award a score between 0 and 10, where each score may be a floating-point value. The highest and lowest scores are thrown out and the remaining scores are added together. The sum is then multiplied by the degree of difficulty for that dive. The degree of difficulty ranges from 1.2 to 3.8 points. The total is then multiplied by 0.6 to determine the diver’s score. Write a computer program that will ultimately determine the diver’s score. This program must include the following methods: A method name inputValidScore that inputs one valid score for one judge for one diver. This method will return the valid score. A method named inputAllScores that creates an array to store the scores for all judges for the diver. This method will fill the array with a valid score from each judge. This method does not take input arguments, but it does return the array of scores. A method named inputValidDegreeOfDifficulty that inputs a…using c++ Write a program that computes and displays the charges for a patient's hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient, the following data should be entered: The number of days spent in the hospital The daily rate Hospital medication charges Charges for hospital services (lab test, etc.) The program should ask for the following data if the patient was an out-patient: Charges for the hospital services (lab test, etc.) Hospital medication charges The program should use two functions to calculate the total charges. One of the functions should accept arguments for the in-patient data, while the other function accepts arguments for out-patient information. Both functions should return the total charges.Home Work 2: It is required from you to write a code in C language to find the average for any five numbers.
- C ++ Code Write a program that can be used to calculate the federal tax. The tax is calculated as follows: For single people, the standard exemption is $4,000; for married people, the standard exemption is $7,000. A person can also put up to 6% of his or her gross income in a pension plan. The tax rates are as follows: If the taxable income is: Between $0 and $15,000, the tax rate is 15%. Between $15,001 and $40,000, the tax is $2,250 plus 25% of the taxable income over $15,000. Over $40,000, the tax is $8,460 plus 35% of the taxable income over $40,000. Prompt the user to enter the following information: Marital status If the marital status is “married,” ask for the number of children under the age of 14 Gross salary (If the marital status is “married” and both spouses have income, enter the combined salary.) Percentage of gross income contributed to a pension fund Your program must consist of at least the following functions: Function getData: This function asks the user to enter…C++ OOP Write a program that does the following:• Prompts the user to input five decimal numbers.• Prints the five decimal numbers.• Converts each decimal number to the nearest integer.• Adds the five integers.• Prints the sum and average of the five integers.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.