Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Forge {
- public static void main(String[] args){
- Scanner tastiera = new Scanner(System.in);
- int nbeni = 0;
- String beni = null;
- int sbeni = 0;
- int i = 0;
- System.out.println("Numero di beni da inserire:");
- nbeni = tastiera.nextInt();
- System.out.println("Inserire " +nbeni+ " beni e numero desiderato");
- for(i=0; i<nbeni; i++){
- beni = tastiera.next();
- sbeni = tastiera.nextInt();
- }
- System.out.println("Ti serve:");
- for(i = 0; i<nbeni; i++){
- System.out.println(sbeni+ " di " +beni);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement