Write a program called checkpassfail

Assignment Help Basic Computer Science
Reference no: EM13985179

Business Computer Languages

Q1. Identify and correct the error(s) in each of the following:

a) if (1 <= x <= 10)

System.out.println(x);

b) if (x = 1)

y++;

else if (x = 2)

y = y + 2;

c) final double CM_PER_INCH = 2.54;

CM_PER_INCH = 2.55;

Q2. What are the values of the following expressions? In each line, assume that

1. What are the values of the following expressions?  In each line assume that

double  X = 2.5,  Y = -1.5;
int  M = 18,  N = 4;
String  S = "Hello",  T = "World";

i)  X + N * Y - ( X + N ) * Y

ii) M / N + M % N

iii) 5 * X - N / 5

iv) S + T

v)  S + N

vi) ( 1 - ( 1 - ( 1 - ( 1 - N ))))

Q3. Write a program called CheckPassFail which read the mark from user and prints "PASS" if the mark is more than or equal to 60; or prints "FAIL" otherwise.

Reference no: EM13985179

Questions Cloud

How do stakeholders define ethical issues in business : How do stakeholders define ethical issues in business? Can stakeholders influence ethical decision in business?
Find the thermal resistance of each cube : Two metal cubes, one copper (Cu) and one aluminum (Al), with 4 cm edges are arranged as shown in Figure 1. Find (j) the thermal resistance of each cube, (ii) the thermal resistance of the two-cube system, (iii) the thermal current I and (iv) the t..
What was the original amount of uranium-235 in the rock : A rock is found to contain 2.2 grams of uranium-235, a radioactive isotope. If the rock has undergone 2.75 half lives, what was the original amount of uranium-235 in the rock and how old is the rock?
Calculate the projects npv : Calculate the value of the option if the company waits one year. Should the company wait or go ahead with the project now?
Write a program called checkpassfail : Write a program called CheckPassFail which read the mark from user and prints "PASS" if the mark is more than or equal to 60; or prints "FAIL" otherwise.
Calculate the current value of the company : Calculate the current value of the company's stock, using equation: Price per share = Vs/shares outstanding
Unique characteristics of the russian culture : What are some unique characteristics of the Russian culture that make cyberspace issues more challenging - do Russia and China do enough in the cyberspace area?
What is the photon energy in joules : Calculate the carrier frequency and corresponding frequency bandwidth for a microwave communication system operating at 10 cm with a microwave bandwidth of 0.2 mm and for an optical communication system operating at 1.35 micrometers with an optical b..
What absolute temperature will the ends touch : Again starting at 293 K, the steel rod is replaced by a brass rod 1.92 m long, also placed 0.6 cm from the aluminum rod and clamped tight on its other end. At what absolute temperature will the two rods touch?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Which editions of windows would you select

Which editions of Windows 7 would you select for the workstations to provide the required features and performance most economically? Make sure you include a detailed rationale for your decision

  You are to design and construct a 3-bit synchronous counter

You are to design and construct a 3-bit synchronous counter with an enable (EN) input. The counter is to count in the prescribed squence shown below if EN is true at the next active clock transition

  Questions based on computer science

Which of these statements are true, for propositional logic? (In an exam you would have to justify your answers). A. If a formula is not satisfiable then it is not valid B. X is not satisfiable if and only if ¬X is valid C. If a formula is not valid ..

  In the early days of information systems

In the early days of information systems, the IT department controlled all of the components of the system from data retrieval to processing to reporting. Today, the IT department is being directed to do the same tasks, but uses devices that are mobi..

  Explaining it solutions to enhance workflows

The final method to include IT is not to go "looking for IT solutions" just for sake of using IT. But to have IT at the table to truly think about ways to develop workflows.

  Explain problems with gathering information requirements

One of the potential problems with gathering information requirements by observing potential system users is that people may change their behavior when observed.

  How a compiler translates into machine language

Show the code that can be generated from the production given in the diagram, and the semantic record created for the new nonterminal symbol .

  Virtual organization

Consider how the information presented in each assignment applies to your chosen Virtual Organization.

  Compare and contrast frameworks

Compare and contrast the 3 selected frameworks

  How implement memory allocation with strings

how implement memory allocation with strings.

  Going abroad with engineers

You supervise 12 engineers. Their formal training and work experience are very similar, so you move them around on different projects. Yesterday, your manager informed you that an overseas affiliate has requested four engineers to go abroad on ext..

  Explain how you would apply the six sigma approach

When a senior product inspector at Plush Packet Inc. (PPI) inspected a shipment of Router the Raccoon plush toys she discovered that, on average, 15 of the 50 toys in every box had defective seams, and in many of the defective toys, the seams w..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd