Specify the local and Global variables used in the code below and express the reason
Q: #include Finclude #define p printf main() p(#); p(in##\n"); p('HI");
A: Please find the answer below :
Q: Please help Why is privacy in the workplace important in employees computers? Legally and just in ge...
A: Privacy is really important for an individual. At workplace, an employee spends much of his time the...
Q: Question 2: Student Grades Report Java Program In this question, write a complete Java program to pr...
A: Algorithm: Read a string in given format Then split the string with ";" as delimiter and store the ...
Q: te the following code segment in MARIE's assembly language. (Hint X>1 is equivalent to X-1>0) : if X...
A: I have write the code segment below:
Q: Explain why each principle is vital to security and how it permits the development of security mecha...
A: Introduction: A security policy is a collection of rules or processes that an organization imposes o...
Q: Why is Reddit more popular than instant messaging? What are the advantages of Reddit?
A: Reddit is a social news site. Despite of a basic interface lots of people are visiting this site on ...
Q: Do the programming exercises on page 54-55 Exercise 1: A user-friendly program should print an intro...
A:
Q: Write a simple payroll program that will display employees information. Refer to the UML Class Diagr...
A: Given: Write a simple payroll program that will display employees information. Refer to the UML Clas...
Q: 5. Let Σ = {0, 1} be an alphabet and let L ⊆ Σ ∗ be the language consisting of all words over Σ that...
A: Designed the DFA for the given language
Q: the formula and simplified logical diagram of the following truth tabe
A:
Q: Fill in the following blank using in from your textbook. The kids in
A: Fill in the following blank using information from your textbook. The kids in Hollywood-- are often
Q: #include #include #define p printf #define s scanf void main() { char ans; p(“Do you want to...
A: This is simple program to display message on screen and taking input through keyboard and string in ...
Q: Paragraph Completion: Switzerland is only a small country but has rich natural endowments, especiall...
A: ANS:- Option 4:- In the alps the weather is generally cool even in the summer
Q: What is a sign bit and where can you find one
A: Step 1 The answer is given in the below step.
Q: Put the verb into the correct form: The film wasn't very good. I it _(enjoy) .much
A: you question is about correct verb from
Q: Solve the recurrence T(n) = T(; +5) + n².
A: Given: Solve the following recurrence T(n) = T(n/5 +5) + n2
Q: In the MIT School, there will be Election going on. For the Election, there is a condition that the ...
A: Required:- In the MIT School, there will be elections going on. For the Election, there is a conditi...
Q: Put the verb into the correct form: Where (Maria / come) from? Is she ?Spanish
A: Come is the correct verb
Q: x = 1002 and fl(x) = 1001. Show the relative error is roughly smaller than the condition number time...
A:
Q: 12. The keyboard shortcut to toggle between anchored cells ($) and unanchored cells (no $) is: a. F4...
A: According to the question Ms-excel is the most usable application by uses of microsoft for accountin...
Q: Given the assumptions above and the page table below, translate the following virtual addresses (exp...
A: Below is the answer to the above question. I hope this will be helpful.
Q: A fixed percentage of water is taken from a well each day. Request values for W and Pwhere: • W is t...
A: C# code: using System;class HelloWorld { static void Main() { { int days = 1,p=10; flo...
Q: Data Structures and algorithms (C/C++) 12. Given lists L1, L2 and L3, delete all the nodes having e...
A: Given: Data Structures and algorithms (C/C++) 12. Given lists L1, L2 and L3, delete all the nodes ha...
Q: Function 1: Password Checker function _one(pwd) Create a JavaScript function that meets the followin...
A: Due to company policies I am compelled to solve only one question that is the first question. Please...
Q: Create a pointer to a char value named nthCharPtr pointing to the 6th character of oddOrEven (rememb...
A: Given: Create a pointer to a char value named nthCharPtr pointing to the 6th character of oddOrEven(...
Q: You are reading someone's mind by asking them to chooose a number between 1 and 63. They tell you th...
A: The number that the person may have chosen would be 30
Q: Create an application that predicts the approximate size of a population of organisms. The applicati...
A: Answer: Program Plan Prompt the user for Starting number of organisms. Prompt the user for Average...
Q: For the next four months, the following demands are expected: 500, 650, 1000 and 700 units. Unit pro...
A: Step a. Consider the production plan of a manufacturing unit to meet customers’ demands with minimum...
Q: Write a new sentence with the ng. I didn't spend as much mo
A: Write a new sentence with the same meaning. I didn't spend as much money as you. You
Q: In the state space shown below ( refer to image ), write the order in which states are expanded if t...
A: ANSWER: Depth First Search: Depth-first search is a calculation for navigating or searching tree or ...
Q: Will the following program work? #include int main() { int n=5; printf("n=%*d\n", n, n); return 0; ...
A: The answer is given below:-
Q: DATABASE: library (library_name [pk], City, Phone, manager_SSN[pk, fk]) book (book_name [pk], Genre,...
A: answer is
Q: Write a Java program to get the permutations of the user entered string.
A: Required:- Write a Java program to get the permutations of the user entered string. Approach:- Take ...
Q: that is to be incremented three times as long as the Boolean is false. If the Boolean is true, ti in...
A: In this question, we are asked to complete a program in java Partially code is given Algorithm: 1) I...
Q: strategies of research engineer , to help businesses prepare for the explosion in 5G and by extensi...
A: Modern IoT has distinct correspondence requirements, for example, high consistency, minimal dormancy...
Q: disadvantages of using Serial Commun. Circuit (FC) for serial communications.
A: given - Compare the advantages and disadvantages of using Serial Communication Interface SPI) versus...
Q: 80) = (0, 1, 0, 1, 1, 0) and tâp Po) = (0, 1,0, 1, 0, 0). 2 bits output by this LFSR? nswer in the f...
A: Lets see the solution.
Q: What is Data Mining's Purpose?
A: Introduction: Data mining is the process of identifying patterns, anomalies, and correlations in hug...
Q: WHY DO WE NEED TO GET RID OF DATA REDUNDANCY?
A: Suppose in a database we have two tables(relations). SchoolStudent (RollNo, Name, Age, BirthDate, Ge...
Q: For stopped irreversible expansion of 1.0 mole of ideal monatomic gas in an adiabatic frictionless p...
A:
Q: In any of the following programming language in the choices (python, c#, javascript), make a simple ...
A: Data StructuresA data structure is a particular way of organizing data in a computer so that it can ...
Q: A business operates a multi-tiered online platform that hosts news articles. The application is host...
A: Introduction The question is about A business that operates a multi-tiered online platform that host...
Q: Before time sharing, why was batch processing the most popular method of computer access?
A: Introduction This question explains about batch processing the most common way of computer access p...
Q: Write a program that dynamically allocates an array large enough to hold a user defined number of te...
A: Explanation: The first step is to include the header file. The next step is to create a pointer tha...
Q: PYTHON You have been given the following proposition: pv (p A q) Write a code in python to prove tha...
A: The above python pogram is solved below
Q: An operation is defined as below: LDR r0, =0×000000C8 MOVS r4, #1 ; r4 = 1 EORS r0, r0, r4, LSL #5 ;...
A: Here in this question we have given some sequence of instructions and we have asked to find the valu...
Q: List some softwares which are open source along with their usage [At least 4].
A: Open GL is not a programming language mainly it is an API that has the main different codes which ca...
Q: cco ccicc2cc3 CC4 CC5 CC6 CC7 CC8 Cc9cc10cc1icc12cC13 IF D EX MEMWB ock $1, 24($S0) $2, 28($S0) d $5...
A: From the instructon: Lw (load )instruction occupies 50% take cc(clock) 1 ALU (add) instruction o...
Q: Discuss: If you could create a dashboard that met your personal or business needs, what would you sh...
A: If you could create a dashboard that met your personal or business needs, what would you show?
Step by step
Solved in 2 steps
- Computer Fundamentals and Programming 2 Write a program that determines a student’s grade. The program will accept 3 scores and computes the average score. Determine the grade based on the following rules: - If the average score is equal or greater than 90, the grade is A. - If the average score is greater than or equal to 70 and less than 90, the grade is B. - If the average score is greater than or equal to 50 and less than 70, the grade is C. - If the average score is less than 50, the grade is F. Source Codes and Print Screen of the OutputOrder check [15 points]. Write a program OrderCheck.java that takes four int command-line arguments w, x, y, and z. Define a boolean variable whose value is true if the four values are either in strictly ascending order (w < x < y < z) or strictly descending order (w > x > y > z), and false otherwise. Then, display the boolean variable value.NOTE 1: Do not use if statements on this program.NOTE 2: Assume that the inputs will always be integers.#include using namespace std; int main() { int type; double Vth, Vg, Vd, Vs; cin>>type>>Vth>>Vg>>Vd>>Vs; return 0; }
- 1. [LO 1, LO 2, LO 3 & LO 4, Treasure Hunter Description You are in front of a cave that has treasures. The cave can be represented in a grid which has rows numbered from 1 to , and columns numbered from 1 to . For this problem, define (x,y ) as a tile that is in the the-x row and the y-row. There is a character in each tile, which indicates the type of that tile. Tiles can be floors, walls, or treasures which are represented respectively by the characters '.' (period), '#' (hashmark), and '*' (asterisk). You can go through the floor tiles and treasures, but you can't get past the wall tiles.Initially, you are in a tile (??, Sy). You want to visit all the treasure squares, and retrieve the treasure. When you visit a treasure tile, the treasure is instantly retrieved, and the tile turns into a floor.In a move, if you are on a tile (?,y), then you can move to the right tile above (?-1,y), right (?,y + 1), down (? + 1, ), and left (?, 1) of the current tile. The tile you visit must…// HouseSign.cpp - This program calculates prices for custom made signs. #include <iostream> #include <string> using namespace std; int main() { // This is the work done in the housekeeping() function // Declare and initialize variables here // Charge for this sign // Color of characters in sign // Number of characters in sign // Type of wood // This is the work done in the detailLoop() function // Write assignment and if statements here // This is the work done in the endOfJob() function // Output charge for this sign cout << "The charge for this sign is $" << charge << endl; return(0); }(Physics) Coulomb’s Law states that the force, F, acting between two electrically charged spheres is given by this formula: F=kq1q2r2 q1isthechargeonthefirstsphere.q2isthechargeonthesecondsphere.risthedistancebetweenthecentersofthetwospheres.kisaproportionalityconstant. Write an assignment statement to calculate the force, F.
- (Modify) Rewrite the following programs to conform to good programming practice and correct syntax: a. #include using namespace std; int main( ){ cout << “The time has come” ; return 0;} b. #include using namespace std; int main ( ){cout << “Newark is a city\n”;cout << “in New Jersey\n”; cout << “It is also a city\n” ; cout << “in Delaware\n” ; return 0;} c. #include using namespace std; int main() {cout << Reading a program\n”;cout << “is much easier\n” ; cout << “if a standard form for main is used\n” ; cout <<“and each statement is written\n”;cout << “on a line by itself\n” ; return 0;} d. #include using namespace std; int main ( ){ cout << “Every C++ program” ; cout <<“\nmust have one and only one” ; cout << “main function” ; cout << “\n The escape sequence of characters”) ; cout << “\nfor a newline can be placed anywhere” ; cout <<“\n in the message passed to cout” ; return 0;}(Data processing) Write C++ code sections to make the following decisions: a. Ask for two integer temperatures. If their values are equal, display the temperature; otherwise, do nothing. b. Ask for character values letter1 and letter2, representing uppercase letters of the alphabet, and display them in alphabetical order. c. Ask for three integer values, num1, num2, and num3, and display them in decreasing order.(Misc. application) a. The data in the following chart was collected on a recent automobile trip: Write a C++ program that accepts a mileage and gallons value and calculates the miles pergallon (mpg) for that segment of the trip. The mpg is obtained as the difference in mileage between fill-ups divided by the number of gallons of gasoline used in the fill-up. b. Modify the program written for Exercise 9a to also compute and display the cumulative mpg after each fill-up. The cumulative mpg is calculated as the difference between the mileage at each fill-up and the mileage at the start of the trip divided by the sum of gallons used to that point in the trip.
- 4. During each summer, John and Jessica grow vegetables in their backyard and buy seeds and fertilizer from a local nursery. The nursery carries different types of vegetable fertilizers in various bag sizes. When buying a particular fertilizer, they want to know the price of the fertilizer per pound and the cost of fertilizing per square foot. The following program prompts the user to enter the size of the fertilizer bag, in pounds, the cost of the bag, and the area, in square feet, that can be covered by the bag. The program should output the desired result. However, the program contains logic errors. Find and correct the logic errors so that the program works properly. // Logic errors. #include #include using namespace std; int main() { double costs double area; double bagsize; cout > bagsize; cout > cost; cout > area; cout << endl; cout << "The cost of the fertilizer per pound is: $" << bagsize / cost << endl; cout << "The cost of fertilizing per square foot is: $" << area / cost << endl; return 0; }Activity 20 Electric Bill: Using Switch Statement, write a program that will calculate and show bills of the Manila Electric Company. The rates vary depending on whether the use is residential (R), commercial( C) , or industrial (I). Any other code should be treated as an error. The program should accept the subscriber ID, Subscriber Name, his total electrical consumption in a month, and the code of the consumer type. The rates are computed as follows: R: 50 plus .50 per kwh used C: 100 for the first 1000 kwh and 0.45 for each additional kwh I: 180 for the first 1000 kwh and 0.75 for each additional kwh(Rounding Numbers) Function floor can be used to round a number to a specific decimal place. The statementy = floor(x * 10 + 0.5) / 10;rounds x to the tenths position (the first position to the right of the decimal point). The statementy = floor(x * 100 + 0.5) / 100;rounds x to the hundredths position (the second position to the right of the decimal point). Write a program that defines fourfunctions to round a number x in various ways:A. roundToInteger(number)B. roundToTenths(number)C. roundToHundredths(number)D. roundToThousandths(number)For each value read, your program should print the original value, the number rounded to the nearest integer, the number rounded to the nearest tenth, the number rounded to the nearest hundredth and the number rounded to the nearest thousandth.