1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
docker41 [41]
3 years ago
9

1 import java.util.Scanner; 3 public class EqualityAndRelational { 4 public static void main (String args) args) { int userBonus

; int userPoints; userPoints-0; Scanner scnrnew Scanner(System.in); 7 10 userBonus = scnr.nextInt(); // Program will be tested with values : 15, 20, 25, 30, 35. 12 13 14 15 16 17 18 19 * Your solution goes here userPoints-10 else userPoints = 0;
Engineering
1 answer:
Anastaziya [24]3 years ago
7 0

Missing Part of the Question

Complete the expression so that userPoints is assigned with 0 if userBonus is greater than 20 (second branch). Otherwise, userPoints is assigned with 10 (first branch

import java.util.Scanner;

public class EqualityAndRelational {

public static void main (String args) args) {

int userBonus; int userPoints;

userPoints=0;

Scanner scnr = new Scanner(System.in);

userBonus = scnr.nextInt();

// Program will be tested with values : 15, 20, 25, 30, 35. 12 13 14 15 16 17 18 19

( Your solution goes here)

{

userPoints= 10 ;

}

else {

userPoints = 0;

}

}

}

Answer;

Replace

( Your solution goes here)

With

if(userBonus>20).

The full program becomes

import java.util.Scanner;

public class EqualityAndRelational {

public static void main (String args) args) {

int userBonus; int userPoints;

userPoints=0;

Scanner scnr = new Scanner(System.in);

userBonus = scnr.nextInt();

// Program will be tested with values : 15, 20, 25, 30, 35. 12 13 14 15 16 17 18 19

if(userBonus>20)

{

userPoints= 10 ;

}

else {

userPoints = 0;

}

}

}

You might be interested in
A TV USE 75 WATTS WHILE IN USED ASSMING THAT ITIS USED 4 HOURS EVERY DAY HOW MUCH ENERGY IN 4 IN KWH WOULD THE TV CONSUME ANNUAL
prohojiy [21]

Answer:

i don't think i understand the question

Explanation:

7 0
2 years ago
Read 2 more answers
The tropics receive more heat from the sun than is radiated away from the tropics, and polar regions radiate more than they rece
IRINA_888 [86]

Answer:

It is a well known fact that the earth rotates around the sun in an inclined axis which is approximately 23 degree. The inclined nature of earth axis causes variation in the solar heat received at any place on the earth surface. The hemisphere facing the sun due to this axial tilt, gets higher sun energy as compared to the opposite side. The hemisphere which faces the sun will experience summer whereas the hemisphere away from sun will experience winter.

In each of the hemisphere the polar areas will receive higher radiation and longer daytime during the summer season. However it has been observed that there is difference in radiation received at different areas of earth surface and radiated. The tropical areas have lower reflectance and thus a large part of incoming solar radiation have been absorbed along the tropics. The poles though have longer daytime during summer and hence greater solar radiation but due to high reflectance radiate more energy. Thus the tropical areas have surplus energy as compared to deficit energy areas of poles. This difference in energy creates a heat imbalance.

This net heat difference between poles and equator gives rise to a global circulation system leading to flow of heat from the net energy excess areas to deficit areas. This circulation takes place through atmosphere as well as oceans and different process of climate viz. evaporation, transpiration, rainfall, wind, convection, oceanic circulations etc work as tools of this system

4 0
3 years ago
Air modeled as an ideal gas enters a combustion chamber at 20 lbf/in.2
motikmotik

Answer:

The answer is "112.97 \ \frac{ft}{s}"

Explanation:

Air flowing into thep_1 = 20 \ \frac{lbf}{in^2}

Flow rate of the mass m  = 230.556 \frac{lbm}{s}

inlet temperature T_1 = 700^{\circ} F

PipelineA= 5 \times 4 \ ft

Its air is modelled as an ideal gas Apply the ideum gas rule to the air to calcule the basic volume v:

\to \bar{R} = 1545 \ ft \frac{lbf}{lbmol ^{\circ} R}\\\\ \to M= 28.97 \frac{lb}{\bmol}\\\\ \to pv=RT \\\\\to v= \frac{\frac{\bar{R}}{M}T}{p}

      = \frac{\frac{1545}{28.97}(70^{\circ}F+459.67)}{20} \times \frac{1}{144}\\\\=9.8 \frac{ft3}{lb}

V= \frac{mv}{A}

   = \frac{230.556 \frac{lbm}{s} \times 9.8 \frac{ft^3}{lb}}{5 \times 4 \ ft^2}\\\\= 112.97 \frac{ft}{s}

8 0
3 years ago
Select the level of education that is best demonstrated in each example.
Nastasia [14]

Answer:

masters

associate

bachelors

Explanation:

8 0
3 years ago
Read 2 more answers
CS3733: Homework/Practice 05 Suppose we would like to write a program called monitor which allows two other programs to communic
valina [46]

Answer:

#include<stdio.h>

#include<stdlib.h>

#include<unistd.h>

#include<sys/types.h>

#include<string.h>

#include<pthread.h>

//#include<sys/wait.h>

int main(int argc, char** argv)

{

int fd1[2];

int fd2[2];

int fd3[2];

int fd4[2];

char message[] = "abcd";

char input_str[100];

pid_t p,q;

if (pipe(fd1)==-1)

{

 fprintf(stderr, "Pipe Failed" );

 return 1;

}

if (pipe(fd2)==-1)

{

 fprintf(stderr, "Pipe Failed" );

 return 1;

}

if (pipe(fd3)==-1)

{

 fprintf(stderr, "Pipe Failed" );

 return 1;

}

if (pipe(fd4)==-1)

{

 fprintf(stderr, "Pipe Failed" );

 return 1;

}

p = fork();

if (p < 0)

{

 fprintf(stderr, "fork Failed" );

return 1;

}

// child process-1

else if (p == 0)

{

 close(fd1[0]);// Close reading end of first pipe

 char concat_str[100];

 printf("\n\tEnter meaaage:"):

 scanf("%s",concat_str);

 write(fd1[1], concat_str, strlen(concat_str)+1);

 // Concatenate a fixed string with it

 int k = strlen(concat_str);

 int i;

 for (i=0; i<strlen(fixed_str); i++)

 {

  concat_str[k++] = fixed_str[i];

 }

 concat_str[k] = '\0';//string ends with '\0'

 // Close both writting ends

 close(fd1[1]);

 wait(NULL);

//.......................................................................

 close(fd2[1]);

 read(fd2[0], concat_str, 100);

 if(strcmp(concat_str,"invalid")==0)

 {

 printf("\n\tmessage not send");

 }

 else

 {

  printf("\n\tmessage send to prog_2(child_2).");

 }

 close(fd2[0]);//close reading end of pipe 2

 exit(0);

}

else

{

 close(fd1[1]);//Close writting end of first pipe

 char concat_str[100];

 read(fd1[0], concal_str, strlen(concat_str)+1);

 close(fd1[0]);

 close(fd2[0]);//Close writing end of second pipe

 if(/*check if msg is valid or not*/)

 {

  //if not then

  write(fd2[1], "invalid",sizeof(concat_str));

  return 0;

 }

 else

 {

  //if yes then

  write(fd2[1], "valid",sizeof(concat_str));

  close(fd2[1]);

  q=fork();//create chile process 2

  if(q>0)

  {

   close(fd3[0]);/*close read head offd3[] */

   write(fd3[1],concat_str,sizeof(concat_str);//write message by monitor(main process) using fd3[1]

   close(fd3[1]);

   wait(NULL);//wait till child_process_2 send ACK

   //...........................................................

   close(fd4[1]);

   read(fd4[0],concat_str,100);

   close(fd4[0]);

   if(sctcmp(concat_str,"ack")==0)

   {

    printf("Messageof child process_1 is received by child process_2");

   }

   else

   {

    printf("Messageof child process_1 is not received by child process_2");

   }

  }

  else

  {

   if(p<0)

   {

    printf("Chiile_Procrss_2 not cheated");

   }

   else

   {

     

    close(fd3[1]);//Close writing end of first pipe

    char concat_str[100];

    read(fd3[0], concal_str, strlen(concat_str)+1);

    close(fd3[0]);

    close(fd4[0]);//Close writing end of second pipe

    write(fd4[1], "ack",sizeof(concat_str));

     

   }

  }

 }

 close(fd2[1]);

}

}

8 0
3 years ago
Other questions:
  • g A plane stress element has components sigma x = 160 MPa, tau xy = 100 MPa (CW). Determine the two values pf sigma y for which
    13·1 answer
  • Material with hardness of 220 Vickers is harder than material with a hardness of 180 Vickers. a)-True b)- False
    8·1 answer
  • Yield and tensile strengths and modulus of elasticity . with increasing temperature. (increase/decrease/independent)
    11·1 answer
  • PLEASE HELP!!! ILL GIVE BRANLIEST *EXTRA POINTS* dont skip :((
    11·2 answers
  • Simplify the following expressions, then implement them using digital logic gates. (a) f = A + AB + AC (b) f = AB + AC + BC (c)
    5·1 answer
  • URGENT PLEASE HELP!!!
    11·1 answer
  • Make a sketch of a simple mechanically expanded brake and indicate the forces ​ ​ acting on the leading shoe when the brake is a
    10·1 answer
  • If an elevator repairer observes that cables begin to fray after 15 years, what process might he or she use to create a maintena
    11·1 answer
  • I love touching the atmospheres crest
    8·1 answer
  • Which of the following is most likely to require changes to existing zoning laws?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!