Advertisement
joseleonweb

Untitled

Sep 22nd, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.49 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class ObtenirInformacioUsuari {
  4.     public static void main(String[] args) {
  5.         String nom; int edat;
  6.         Scanner teclat = new Scanner(System.in);
  7.         System.out.print(“Si us plau entri el seu nom >>);
  8.         nom = teclat.nextLine();
  9.         System.out.print(“Si us plau entri la seva edat >>);
  10.         edat = teclat.nextInt();
  11.         System.out.println(“El teu nom és “ + nom + “ i tens “ + edat);
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement