Académique Documents
Professionnel Documents
Culture Documents
package interpretacion;
import java.util.Scanner;
public class niño {
private static Scanner dato;
do{
System.out.println ("DIGITE SU SALARIO");
salario=dato.nextDouble();
if (salario<2484348) subtrans=97032;
while(i<Nemple);
return;}}
SICLO WHILE
package interpretacion;
import java.util.Scanner;
public class niño {
private static Scanner dato;
public static void main(String[] args){
// TODO Auto-generated method stub
int NV,C=0,PAptas=0;
double piesa,porcentaje,PAp=0;
System.out.print ("Ingresar Numero de VIGAS: ");
NV=dato.nextInt();
while (C<NV) { C=C+1;
System.out.print ("Ingresar la longitud de la VIGA en centimetros "+C+": ");
piesa=dato.nextInt();
if (piesa<=700 && piesa>=650){ PAptas= (PAptas+1); } }
PAp+=PAptas;
porcentaje=(PAp/NV)*100;
System.out.println ("El Numero de VIGAS Aptas es: "+PAptas);
System.out.println ("El porcentaje de VIGAS Aptas es: "+porcentaje+" % ");}}
SICLO FOR
package interpretacion;
import java.util.Scanner;
public class niño {
private static Scanner dato;
public static void main(String[] args) {
// TODO Auto-generated method stub
int c=0,NV,C=0,PAptas=0;
double VIGA,PAp=0, porcentaje=0;
System.out.print ("Ingresar Numero de VIGAS: ");
NV=dato.nextInt();
porcentaje=(PAp/NV)*100;
package interpretacion;
import java.util.Scanner;
public class niño {
private static Scanner dato;
public static void main(String[] args) {
// TODO Auto-generated method stub
int c,NV,C=0,PAptas=0;
double VIGA,porcentaje=0,PAp=0;
System.out.print ("Ingresar Numero de VIGAS: ");
NV=dato.nextInt();
do {
c=C+1;
System.out.print ("Ingresar la longitud de la VIGA en centimetros "+c);
VIGA=dato.nextInt();
if (VIGA<=700 && VIGA>=650){ PAptas= (PAptas+1); }C++; }
while(C<NV);PAp+=PAptas;
porcentaje=(PAp/NV)*100;
System.out.println ("El Numero de VIGAS Aptas es: "+PAptas);
System.out.println ("El porcentaje de VIGAS aptas es del : " +porcentaje+"
% "); }}