Computer Science, asked by vasumaan741785, 8 months ago

write a program that will read the value of x and compute the following function:
y={7 for x>0
0 for x=0
-7 for x<0​

Answers

Answered by yasirk
1

Explanation:

which class which subject any info

Answered by Disha234
1

Explanation:

here is a java program

import java.util.*;

class xyz

{public void disp()

int y

{

Scanner in =new Scanner(System.in)

int x=in.nextInt

if(x>0)

y=7

if(x<0)

y=-7

if (x=0)

y=0

System.out.println(y)

}

}

Similar questions