Computer Science, asked by OoExtrovertoO, 1 day ago

Write a program to take an integer variable to assign 20 increase the value of variable by 10 using shorthand ooerator display the orignal and increased value.

\\

Answers

Answered by IIBrokenBabeII
2

public class Shorthand1

{

public static void main(String[] args)

{

int x;

x = 7;

x += 4;

System.out.println(x);

x = 7;

x -= 4;

System.out.println(x);

x = 7;

x *= 4;

System.out.println(x);

x = 7;

x /= 4;

System.out.println(x);

x = 7;

x %= 4;

System.out.println(x);

}

}

Answered by sarlakoul111
0

Answer:

hope it will help you thank you

Attachments:
Similar questions