Академический Документы
Профессиональный Документы
Культура Документы
Construye
los
algoritmos
computacionales
con
sus
respectivas
1 /*
2 * To change this license header, choose License Headers in
Project Properties.
39
}
40 }
1 /*
2 * To change this license header, choose License Headers in
Project Properties.
3 * To change this template file, choose Tools | Templates
4 * and open the template in the editor.
5 */
6 package proyecto_notas;
7
8 import javax.swing.JOptionPane;
9
10 /**
11 *
12 * @author Romain Torre Zuiga
13 */
14 public class Proyecto_Numero {
15
16
/**
17
* @param args the command line arguments
18
*/
19
public static void main(String[] args) {
20
// TODO code application logic here
21
// Declaracion de variables
22
// double = decimal
23
double N, P, NV;
24
// string = (clase) cadena de texto, el sistema pide
entrada de texto
25
String N1;
26
// Entrada de datos
27
N1 = JOptionPane.showInputDialog("Ingrese
numero");
28
//Conversion de datos (String a double)
29
N = Double.parseDouble(N1);
30
//Proceso
31
P = N * 0.30;
32
NV = N - P;
33
//Salida
34
System.out.println("El valor ingresado es: " + N +
"\nEl porcentaje o disminucion es: " + P + "\nEl nuevo valor
es " + NV);
35
}
36 }
Leer segundos
Total = segundos*0.0133
IGV = Total * 0.18
T. a pagar = Total + IGV
Escribir 'El tiempo consumido es ',Segundos,' Segundos y el Total a
Pagar es S/. ',T. a pagar
Fin
CDIGO JAVA:
1 /*
2 * To change this license header, choose License Headers
in Project Properties.
3 * To change this template file, choose Tools | Templates
4 * and open the template in the editor.
5 */
6 package proyecto_notas;
7
8 import javax.swing.JOptionPane;
9
10 /**
11 *
12 * @author Romain Torre zuiga
13 */
14 public class Proyecto_Pagos {
15
16
/**
17
* @param args the command line arguments
18
*/
19
public static void main(String[] args) {
20
// TODO code application logic here
21
// Declaracion de variables
22
// double = decimal
23
double S, T, IGV, TP;
24
// string = (clase) cadena de texto, el sistema pide
entrada de texto
25
String S1;
26
// Entrada de datos
27
S1 = JOptionPane.showInputDialog("Ingrese segundos
consumidos");
28
//Conversion de datos (String a double)
29
S = Double.parseDouble(S1);
30
//Proceso
31
T = S * 0.0133;
32
IGV = T * 0.18;
33
TP = T + IGV;
34
//Salida
35
System.out.println("Segundos Ingresados: " + S +
"\nA pagar: " + T + "\nEl igv es: " + IGV + "\nTotal a Pagar: "
+ TP);
36
}
37 }