Write price pricequantity in a shorter form What is the imp

Write price = price*quantity; in a shorter form What is the import command needed to use point Write the command to change the String dummy = \"X\" to a char variable Y. Use a for statement and addition coding to print out each of the following: 1197531 BDFHJL BDDFHJL 1-3=-2 1-5=-4 1-7=-6 1-9=8 Extra credit (use rested fors) 1*3 = 3 2*3 = 6 3*3 = 9 4*3 = 12 1*4 = 4 2*4 = 8 3*4 = 12 4*4 = 16

Solution

1)A)

a)A=A-2;

b)A-=2;

c)A--;A--;

d)A+= -2;

B)

Price *= quantity

C) import java.io.*;

D)char y=dummy.charAt(0);

2)

a)

for(int i=11;i>=1;i-=2)

System.out.print( i+” “);

b)

for(int i=66;i<=76;i+=2)

System.out.print( (char)i+” “);

c)

for(int i=66;i<=76;i+=2)

{

If(i==68) System.out.print( (char)i +” “+(char)i+” “);

else System.out.printl((char)i +” “);

}

d)

for(int i=3;i<=9;i+=2)

System.out.print(“1 –“ + i+” =” + (1-i) +” “);

e)

for(j=3;j<=4;j++)

{

for(int i=1;i<=4;i++)

{

System.out.print(i +”*”+j+”= “ + i*j +” “ );

}

System.out.println();

}

 Write price = price*quantity; in a shorter form What is the import command needed to use point Write the command to change the String dummy = \
 Write price = price*quantity; in a shorter form What is the import command needed to use point Write the command to change the String dummy = \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site