Entradas

creating bill

Imagen
code in which the creation of a bill through java netbeans is easy done, I hope to provide to those who want to start programming or those who are studying and let them work something haha Scanner first library is brought after capturing user data with String variables take a method to calculate vat where the operation is performed to calculate the total is multiplied product cost with the amount of product is made, then the VAT is which is the total multiplied by 16 and divided by 100 after taxes plus the total adds a System.out.println and the total sum is displayed; method also creates one invoice within this there one System.out.println showing all data with the user's digit plus the VAT invoice. EXCEPTIONS: when the user enters the number one option while typing which is created if the user what digit is less than 1, would send one System.out.println telling you to enter valid values ​​as if this is no exception would put when multiplied by quantity daria cost 0 and 0 ser...

como crear factura java

Imagen
codigo en el cual se hace la creacion de una factura por medio de java netbeans es muy sencillo, espero que les sirva a los que quieran empezar a programar o los que estan estudiando y les dejaron algo parecido de trabajo jaja primero se trae la libreria Scanner luego se piden los datos del usuario capturando con variables String se hace un metodo calcular iva donde se hace la operacion para calcular el total que es multiplicar el costo del producto con la cantidad del producto, luego se hace el iva que es el total multiplicado por 16 y dividido entre 100 despues se suma el total mas el iva y en un system.out.println se muestra el total de la suma; tambien se crea un metodo factura dentro de este ahi un system.out.println mostrando todos los datos que digito del usuario con su factura mas el iva. EXCEPCIONES: en el momento que el usuario entra en la opcion de digitar cantidad se crea un while donde lo que digito el usuario es menor a 1, mandaria un system.out.println diciendo que d...

nfactorial

Imagen
here is the java code on how to request the entry of a number and re factorial is easy, I hope you serve those interested in this program and this beginning, also for those who are studying programming. first trip to bring the Scanner library, then a short int variable is created and initialized to 2 because that's factorial operation to pass, after a System.out.println asking you to enter the number, and the data is captured an int variable; for it is a sum equals sum i (i is for this) and closes on for a System.out.println factorial it is concatenated with the variable to which the data of the sample are captured number entered with the sum variable that is transforming the factorial number Scanner s= new Scanner(System.in);      int sum=2;      System.out.print("Please enter number:");      int a= s.nextInt();          for(int i=a;i>2;i--){      sum=sum*i;      }   ...

nfactorial

Imagen
acá se encuentra el código en java sobre como  pedir el ingreso de un numero y volverlo factorial es muy fácil, espero que les sirva a los que este interesados en programar y este iniciando, tambien para los que están estudiando programación. primero ahí que traer la librería Scanner, luego se crea una variable int suma y se inicializa en 2 porque así es la operación para pasar a factorial, despues con un system.out.println pidiendo que digite el numero, y se captura el dato con una variable int a; con un for se hace suma es igual a suma por i ( esta i es del for) se cierra el for y con un system.out.println se muestra el factorial concatenado con a que es la variable con la que se capturan el dato del numero ingresado junto con la variable suma que es la que transforma el numero en factorial  Scanner s= new Scanner(System.in);      int suma=2;      System.out.print("Por favor ingrese numero:");      int a= s.nextInt(); ...