Tuesday, 30 October 2018

A small java program using scanner class

A small java program for any platform not only for blue j

This is the program to calculate two variable given by user by using Scanner class.

import java.util.*;
class add
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("enre any two digits");
int n=sc.nextInt();
int n1=sc.nextInt();
int s=n+n1;
System.out.println(s);
}
}

this program will run in any platform without using blue j

Procedure i will give latter 

but ,dont forgot to like and share my vlog

THANKS FOR VISIT






No comments:

Post a Comment

HAY THAKYOU FOE VISIT

Program(python):-Find duplicates in an array (Geeks for geek problem)

QUESTION:- Given an array  a  of size  N  which contains elements from  0  to  N-1 , you need to find all the elements occurring more than o...