Program to input name of candidate ,roll no.,date of examination and examination centre.

               Program to input name of candidate ,roll no.,date of examination and examination centre.Print the admit card of the candidate in the following format:                   




  THE OFFICERS SELECTION COMMISSION
                                                                             ADMIT CARD                
NAME OF THE CANDIDATE :                                                              DATE :
EXAMINATION CENTRE :                                                                    ROLL NUMBER :
import java.util.*;
class Admitcard
{  public static void main()
{  Scanner Sc=new Scanner(System.in);
System.out.println("Enter the name, roll no.,date and examination centre ");
String name=Sc.nextLine();
long roll=Sc.nextLong();
String date=Sc.nextLine();
String center=Sc.nextLine();
{  System.out.println("                 THE OFFICERS SELECTION COMMISSION ");  }
{  System.out.println("                              ADMIT CARD            ");  }
{  System.out.println("NAME OF THE CANDIDATE :"+name+"               DATE :"+date);  }
{  System.out.println("EXAMINATION CENTRE :"+center+"                ROLL NUMBER :"+roll);  }
}  }


Output: Enter name, roll no. , date, and examination centre

                               THE OFFICERS SELECTION COMMISSION
                                                                         ADMIT CARD                
NAME OF THE CANDIDATE : Man                                              DATE : 26.11.16
EXAMINATION CENTRE : xfgjj                                                                               ROLL NUMBER :16/Tt/7723



-----------------------------------------------------------------------------------------------------------

Program to input name of candidate ................  has been shown above.



Just copy paste the code into the class file of Bluej compiler. Change the class name according to your's. 

Thanks for visting Programming in JAVA

Happy Coding !!

No comments:

Powered by Blogger.