Assignment, Books, JAVA, PDFs, Programmimg Languages, Tips

[JAVA Assignment] Write a program to allow user to enter 10 Integers and writes the smallest number

Hey Friends, main motive to write this post is to enhance your programming skills by practicing it. As this is one of  my assignment question.It will very helpful you to enhace your programming skills.

In this question you will use Scanner methos to input data from uses, loops and conditional Statements.

Here is the Code-

import java.util.Scanner;

class User1


public static void main(String args[])


int arr[]=new int[10];

int smallest=32768, temp;

Scanner input=new Scanner(;

System.out.println(“enter 10 integers”);

for(int i=0;i<10;i++)




for(int i=0;i<10;i++)









System.out.print(“smallest number=”+smallest);




You can download source code with class file from here


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s