Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package scuola;
- import java.util.*;
- public class IVA1 {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Scanner input;
- input=new Scanner (System.in);
- int nfat, iva, cont = 0, fat;
- float tot = 0, ivatot=0, ivaf;
- System.out.println("inserire numero fatture ");
- nfat=input.nextInt();
- System.out.println("inserire percentuale iva ");
- iva=input.nextInt();
- while (cont<nfat){
- cont=cont+1;
- System.out.println("inserire fattura ");
- fat=input.nextInt();
- ivaf=fat/100*iva;
- System.out.println("iva sulla fattura: "+ivaf);
- ivatot=ivatot+ivaf;
- tot=tot+fat+ivaf;
- }
- System.out.println("iva calcolata totale: "+ivatot);
- System.out.println("totale fatture: "+tot);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment