import java.util.*;
public class prg1
public static void main (String args[]).
{
Scanner in = new Scanner(System.in);
int a,b,c=0;
System.out.println("enter values ");
a -in.nextInt();
b=in.nextInt();
c=a; a=b;b=c;
System.out.println("value of a="+a);
System.out.println("value of b="+b);
}
Can we use backslash n here?
If so how
Answers
Answered by
0
Answer:
may be.................
Answered by
2
Answer:
yes we can but we have do a little changes in the program like:
System.out.println to system.out.print("value of a="+a+ "/n");
the use of backslash n is to print new line
system.out.println does the same thing :)
you have to change println to print.
so ,system.out.print("value of a="+a+ "/n");
system.out.print("value of b="+b+ "/n");
hope it helps!
plz mark me as brainliest!
Explanation:
Similar questions