0% found this document useful (0 votes)
2 views1 page

Practice 2

Uploaded by

samyak jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Practice 2

Uploaded by

samyak jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

import java.util.

Scanner;

public class main {

public static void main (String[] args) {

System.out.println("Hello World");
Scanner sc = new Scanner(System.in);

}
}

----------------------------------------------------|

import java.util.Scanner;

public class Main{


public static void main (String [] args){
Scanner sc = new Scanner(System.in);

System.out.print("Enter 1st number : ");


int a = sc.nextInt();
System.out.print("\nEnter 2nd number : ");
int b = sc.nextInt();
System.out.print("\nEnter 3rd number : ");
int c = sc.nextInt();

System.out.println("Sum of integers is : " +(a+b+c));

}
}

----------------------------------------------------|

You might also like