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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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