Programación Estructurada

TABLA DEL 3

public class TablaDel3{

public static void main (Strings[]args){

  System.out.println("3 x 1 = 3");

  System.out.println("3 x 2 = 6");

  System.out.println("3 x 3 = 9");

  System.out.println("3 x 4 = 12");

  System.out.println("3 x 5 = 15");

  System.out.println("3 x 6 = 18");

  System.out.println("3 x 7 = 21");

  System.out.println("3 x 8 = 24");

  System.out.println("3 x 9 = 27");

  System.out.println("3 x 10 = 30");

 }

}

 

OPERACIONES ARITMETICAS

public class OperacionesAritmeticas{

public static void main (Strings[]args){

  int A=7, B=5, C=3, D=6, R1, R2, R3, R4, R5;

  R1 = A+5*C-D;

  R2 = 7*A/(C*D);

  R3 = 55/B+(A+B+C);

  R4 = (A/B*C)-(A+B/C);

  R5 = (33+A*B)/(56+C+B-A);

  System.out.println("R1= "+R1);

  System.out.println("R2= "+R2);

  System.out.println("R3= "+R3);

  System.out.println("R4= "+R4);

  System.out.println("R5= "+R5);

 }

}