QUIZ
import [Link].*;
import [Link].*;
public class QUIZ
public static void main (String args[])throws IOException
int sc=0;
InputStreamReader read=new InputStreamReader([Link]);
BufferedReader in=new BufferedReader(read);
[Link]("***WELCOME TO THE WORLD OF QUIZ LET US
SEE HOW FAR YOU CAN GO***");
[Link]("========================================
========================");
[Link]("You can just enter the option number which you
feel correct");
[Link]("1.***SPORTS***");
[Link]("2.***INDIAN ECONOMY***");
[Link]("3.***GENERAL KNOWLEDGE***");
[Link]("+++++ENTER YOUR CHOICE+++++");
int choice=[Link]([Link]());
if(choice==1)
[Link]("`````GET READY FOR THE BRAIN STORM````");
[Link]("`````````````````````````````````````````");
[Link]("YOU CAN JUST ENTER THE OPTION NUMBER
WHICH YOU FEEL TRUE");
[Link]();
[Link]("1)Which indian cricketer is popularly called
'jammy'");
[Link]("=====[Link] tendulkar======");
[Link]("=====[Link] ganguly======");
[Link]("=====[Link] singh======");
[Link]("=====[Link] dravid======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int aa=[Link]([Link]());
if(aa==4)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS RAHUL DRAVID");
[Link]();
[Link]("2)which is the only cricketer to score a four
hundred(not out)?");
[Link]("=====[Link] ponting ======");
[Link]("=====[Link] kallis======");
[Link]("=====[Link] lara======");
[Link]("=====[Link] harris======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int ab=[Link]([Link]());
if(ab==3)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS BRIAN LARA ");
[Link]();
[Link]("3)what would the letters PB next to an athlete's
name signify?");
[Link]("=====[Link] box ======");
[Link]("=====[Link] box======");
[Link]("=====[Link] ball======");
[Link]("=====[Link] banned======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int ac=[Link]([Link]());
if(ac==2)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS PERSONAL BEST ");
[Link]();
[Link]("4)what is the shortest distance in a track and
field event where the runners are allowed to break lanes?");
[Link]("=====1.200m ======");
[Link]("=====2.800m======");
[Link]("=====3.600m======");
[Link]("=====4.400m======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int ad=[Link]([Link]());
if(ad==2)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS 800m ");
[Link]();
[Link]("5)the standard colours of which sporting event
are green and purple?");
[Link]("=====[Link] cup ======");
[Link]("=====[Link] cup ======");
[Link]("=====[Link]======");
[Link]("=====[Link] cup ======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int ae=[Link]([Link]());
if(ae==3)
{
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS WIMBLEDON ");
[Link]();
[Link]("6)the olympic gold medal consists 5.2% of which
metal?");
[Link]("=====[Link] ======");
[Link]("=====[Link] ======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int af=[Link]([Link]());
if(af==1)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
}
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS GOLD ");
[Link]();
[Link]("7)which of these games is officially played only
by girls?");
[Link]("=====[Link] ball======");
[Link]("=====[Link] ball ======");
[Link]("=====[Link] ball======");
[Link]("=====[Link] tennis ======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int ag=[Link]([Link]());
if(ag==2)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS NET BALL ");
[Link]();
[Link]("8)who was the first cricketer to score 1000test
runs,played 100test matches and took 100test catches?");
[Link]("=====[Link] sobers======");
[Link]("=====[Link] donald======");
[Link]("=====[Link] chappel======");
[Link]("=====[Link] dev======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int ah=[Link]([Link]());
if(ah==1)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS GARFIELD SOBERS");
[Link]();
[Link]("9)how many players are there in the game of
basket ball?");
[Link]("=====1.5 ======");
[Link]("=====2.6 ======");
[Link]("=====3.8======");
[Link]("=====4.11 ======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int ai=[Link]([Link]());
if(ai==2)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS 6");
[Link]();
[Link]("10)when was the first common wealth games
held?");
[Link]("=====1.1930 ======");
[Link]("=====2.1934======");
[Link]("=====3.1938======");
[Link]("=====4.1948======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int aj=[Link]([Link]());
if(aj==1)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS 1930");
[Link]();
[Link]("11)The FIFA World Cup 2018 was be held in?");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link] Aires======");
[Link]("=====[Link]======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int ak=[Link]([Link]());
if(ak==2)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
}
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS TOKYO");
[Link]();
[Link]("12)Antony De Mello Trophy is associated with
test cricket series played between?");
[Link]("=====[Link] and India======");
[Link]("=====[Link] and India======");
[Link]("=====[Link] Africa and India======");
[Link]("=====[Link] and Australia======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int al=[Link]([Link]());
if(al==2)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS ENGLAND AND INDIA");
[Link]();
[Link]("13)How many squares are there in a Chess
Board?");
[Link]("=====1.24======");
[Link]("=====2.36======");
[Link]("=====3.48======");
[Link]("=====4.64======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int am=[Link]([Link]());
if(am==4)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS 64");
[Link]();
[Link]("14)Which of the following countries has not
been a host of Asian Games?");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int an=[Link]([Link]());
if(an==2)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS PAKISTAN");
[Link]();
[Link]("15)India first won the Olympic Hockey gold at?");
[Link]("=====[Link] Angeles======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int ao=[Link]([Link]());
if(ao==2)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS AMSTERDAM");
[Link]("%%%%%FINALLY YOU HAVE
SCORED="+sc+"POINTS%%%%%%");
if(sc<200)
[Link]("!!!!!SORRY! WE DON'T HAVE A PRIZE FOR
YOU!!!!!");
if(sc>=200&&sc<500)
[Link]("!!!!!CONGRATULATIONS! YOU WIN A BIG GRAND
CHEQUE OF Rs50000!!!");
if(sc>500&&sc<=750)
[Link]("!!!!!CONGRATULATIONS! YOU WIN A BIG GRAND
CHEQUE OF Rs100000!!!!");
}
if(choice==2)
[Link]("1)which country is the largest producer of
milk?");
[Link]("=====[Link] ======");
[Link]("=====[Link] ======");
[Link]("=====[Link]======");
[Link]("=====[Link] ======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int ba=[Link]([Link]());
if(ba==3)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS INDIA");
[Link]();
[Link]("2)In India, which of the following has the highest
share in the disbursement of credit to agriculture and allied
activities??");
[Link]("=====[Link]-operative Banks ======");
[Link]("=====[Link] Banks ======");
[Link]("=====[Link] Institutions======");
[Link]("=====[Link] Rural Banks======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int bb=[Link]([Link]());
if(bb==2)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS COMMERCIAL BANKS");
[Link]();
[Link]("3)Which one of the following agencies assigns
the Agricultural Income Tax to States in India? ?");
[Link]("=====[Link] Finance
Corporation======");
[Link]("=====[Link] Development Council ======");
[Link]("=====[Link] commission======");
[Link]("=====[Link] State Council======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int bc=[Link]([Link]());
if(bc==3)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS FINANCE COMMISSION");
[Link]();
[Link]("4)NABARD was established in the?");
[Link]("=====[Link] Five year Plan ======");
[Link]("=====[Link] Five Year Plan ======");
[Link]("=====[Link] Five Year Plan======");
[Link]("=====[Link] Five Year Plan ======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int bd=[Link]([Link]());
if(bd==3)
{
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS SIXTH FIVE YEAR PLAN");
[Link]();
[Link]("5)Which one of the following methods of soil
conservation is most effective in ariel areas?");
[Link]("=====[Link] ======");
[Link]("=====[Link] belt ======");
[Link]("=====[Link] plugging ======");
[Link]("=====[Link]======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int be=[Link]([Link]());
if(be==2)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
}
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS SHELTER BELT");
[Link]();
[Link]("6)Rashtriya Krishi Vika Yojna was launched in the
year?");
[Link]("=====1.2005 ======");
[Link]("=====2.2007 ======");
[Link]("=====3.2008======");
[Link]("=====4.2009======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int bf=[Link]([Link]());
if(bf==2)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS 2007");
[Link]();
[Link]("7)The head office of the National Bank for
Agriculture and Rural Development(NABARD)?");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link] Delhi======");
[Link]("=====[Link]======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int bg=[Link]([Link]());
if(bg==4)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS MUMBAI");
[Link]();
[Link]("8)The Blue Revolution is related with?");
[Link]("=====[Link] production======");
[Link]("=====[Link] production======");
[Link]("=====[Link] production======");
[Link]("=====[Link] grain production======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int bh=[Link]([Link]());
if(bh==2)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS FISH PRODUCTION");
[Link]();
[Link]("9)Which one of the following co-operative
societies is responsible for the production of fertilizers?");
[Link]("=====[Link]======");
[Link]("=====[Link] FED======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int bi=[Link]([Link]());
if(bi==4)
{
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS IFFCO");
[Link]();
[Link]("10)The impact of the Green Revolution was felt
most in the production of?");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int bj=[Link]([Link]());
if(bj==4)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
}
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS WHEAT");
[Link]();
[Link]("11)Where is the central Rice Research institute
located?");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int bk=[Link]([Link]());
if(bk==2)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS CUTTACK");
[Link]();
[Link]("12)Who is known as the father of 'White
Revolution' in India?");
[Link]("=====1.B.P. Pal======");
[Link]("=====2.K.N. Bhal======");
[Link]("=====3.V. Kurien======");
[Link]("=====4.M.S. Swaminathan ======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int bl=[Link]([Link]());
if(bl==3)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS [Link]");
[Link]();
[Link]("13)Green Revolution in India started from?");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link] Nagar======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int bm=[Link]([Link]());
if(bm==4)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS PANT NAGAR");
[Link]();
[Link]("14)Swaroop committee is associated with?");
[Link]("=====[Link]======");
[Link]("=====[Link] marketing======");
[Link]("=====[Link] marketing======");
[Link]("=====[Link] products marketing======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int bn=[Link]([Link]());
if(bn==4)
{
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS FINANCIAL PRODUCTS MARKETING");
[Link]();
[Link]("15)Which one of the following five year plans
has the highest GDP growth rate in Agriculture sector in India?");
[Link]("=====[Link] Five Year Plan======");
[Link]("=====[Link] Five Year Plan======");
[Link]("=====[Link] Five Year Plan======");
[Link]("=====[Link] Five Year Plan======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int bo=[Link]([Link]());
if(bo==3)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
}
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS EIGHTH FIVE YEAR PLAN");
[Link]("%%%%%FINALLY YOU HAVE
SCORED="+sc+"POINTS%%%%%%");
if(sc<200)
[Link]("!!!!!SORRY! WE DON'T HAVE A PRIZE FOR
YOU!!!!!");
if(sc>=200&&sc<500)
[Link]("!!!!!CONGRATULATIONS! YOU WIN A BIG GRAND
CHEQUE OF Rs50000!!!");
if(sc>500&&sc<=750)
[Link]("!!!!!CONGRATULATIONS! YOU WIN A BIG GRAND
CHEQUE OF Rs100000!!!!");
if(choice==3)
[Link]("1)something beautiful for god is a book by
malcolm muggeridge. who is the subject of this book?");
[Link]("=====[Link] teresa======");
[Link]("=====[Link] roy======");
[Link]("=====[Link] arhart======");
[Link]("=====[Link] tagore======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int ca=[Link]([Link]());
if(ca==1)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS MOTHER TERESA");
[Link]();
[Link]("2)which indian has the most number of roads
named after him?");
[Link]("=====[Link] gandhi======");
[Link]("=====[Link]======");
[Link]("=====[Link] chandra bose======");
[Link]("=====[Link] lal nehru======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int cb=[Link]([Link]());
if(cb==1)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS MAHATMA GANDHI");
[Link]();
[Link]("3)if an indian army officer has three stars on his
car plate, what is his rank?");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link] general======");
[Link]("=====[Link]======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int cc=[Link]([Link]());
if(cc==3)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS LIEUTENTANT GENERAL");
[Link]();
[Link]("4)who made his film debut in 'saat
hindustaani'?");
[Link]("=====[Link]======");
[Link]("=====[Link] bachchan======");
[Link]("=====[Link] khanna======");
[Link]("=====[Link]======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int cd=[Link]([Link]());
if(cd==2)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS AMITHBH BACHCHAN");
[Link]();
[Link]("5)what did charlie chaplin always carry in his
hand?");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link] mask======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int ce=[Link]([Link]());
if(ce==1)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS STICK");
[Link]();
[Link]("6)in which country was the chess invented?");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int cf=[Link]([Link]());
if(cf==1)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS MILK");
[Link]();
[Link]("7)the colour of the highest belt in karate is black.
what is the colour of the lowest belt?");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int cg=[Link]([Link]());
if(cg==3)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS WHITE");
[Link]();
[Link]("8)which day is said to be the longest day?");
[Link]("=====[Link] 21======");
[Link]("=====[Link] 15======");
[Link]("=====[Link] 16======");
[Link]("=====4.december21======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int ch=[Link]([Link]());
if(ch==1)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS JUNE 21");
[Link]();
[Link]("9)if your mother was a horticulturist, what
would she be interested in?");
[Link]("=====[Link] and gardening======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("+++++ENTER YOUR CHOICE+++++");
String v11=[Link]();
int ci=[Link]([Link]());
if(ci==1)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
}
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS FLOWERS AND GARDENING");
[Link]();
[Link]("10)The mineral in which India depends largely on
imports is?");
[Link]("=====[Link] Ore======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int cj=[Link]([Link]());
if(cj==4)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS MERCURY");
[Link]();
[Link]("11)The last Mughal Emperor was?");
[Link]("=====[Link]======");
[Link]("=====[Link] Shah======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int ck=[Link]([Link]());
if(ck==2)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS BAHADUR SHAH");
[Link]();
[Link]("12)The state which leads in agricultural
production is?");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link] Nadu======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int cl=[Link]([Link]());
if(cl==2)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS PUNJAB");
[Link]();
[Link]("13)The longest mountain range in the world
is?");
[Link]("=====[Link] Alps======");
[Link]("=====[Link] Himalayas======");
[Link]("=====[Link] Andes======");
[Link]("=====[Link] Rockies======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int cm=[Link]([Link]());
if(cm==3)
{
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS THE ANDES");
[Link]();
[Link]("14)The most populous city in the world is?");
[Link]("=====[Link]======");
[Link]("=====[Link]======");
[Link]("=====[Link] ======");
[Link]("=====[Link] ======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int cn=[Link]([Link]());
if(cn==4)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
}
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS TOKYO");
[Link]();
[Link]("15)National Integration Day is celebrated on?");
[Link]("=====[Link] 4 ======");
[Link]("=====[Link] 31 ======");
[Link]("=====[Link] 14======");
[Link]("=====[Link] 19======");
[Link]("+++++ENTER YOUR CHOICE+++++");
int co=[Link]([Link]());
if(co==1)
[Link]("`````you are on the right track`````");
sc=sc+50;
[Link]("YOUR SCORE IS" +sc);
else
[Link]("SORRY BETTER LUCK NEXT TIME THE CORRECT
ANSWER IS OCT 4");
{
[Link]("%%%%%FINALLY YOU HAVE
SCORED="+sc+"POINTS%%%%%%");
if(sc<200)
[Link]("!!!!!SORRY! WE DON'T HAVE A PRIZE FOR
YOU!!!!!");
if(sc>=200&&sc<500)
[Link]("!!!!!CONGRATULATIONS! YOU WIN A BIG GRAND
CHEQUE OF Rs50000!!!");
if(sc>500&&sc<=750)
[Link]("!!!!!CONGRATULATIONS! YOU WIN A BIG GRAND
CHEQUE OF Rs100000!!!!");
}
BANKING
import [Link].*;
import [Link].*;
class Account
String Name,Password;
int AccNo,Money;
int dd,mm,yy;
public Account(String n,int an,int d,int m,int y,int mon,String p)
Name=n;
AccNo=an;
dd=d;
mm=m;
yy=y;
Money=mon;
Password=p;
public void displayData()
{
[Link](AccNo+"\t"+Name+"\t\t"+dd+"/"+mm+"/"+yy+"\t
"+Money+"\t\t"+Password);
public class Bank
public static Calendar c=[Link]();
public static int date=[Link]([Link]);
public static int month=[Link]([Link]);
public static int year=[Link]([Link]);
public static InputStreamReader isr=new
InputStreamReader([Link]);
public static BufferedReader x=new BufferedReader(isr);
public static int Ano=1;
public static Account Acc[]=new Account[100];
public static void main() throws IOException
int ch=1;
startAccount();
do
{
[Link](" Welcome to State Bank ");
[Link](" --: OPTION MENU :-- ");
[Link](" 1. Create Account ");
[Link](" 2. Withdrawl ");
[Link](" 3. Deposited ");
[Link](" 4. Checking Account ");
[Link](" 5. Checking Master ");
[Link](" 6. Exit ");
[Link]( "Enter Your Choice(1-6) : ");
switch(ch)
case 1: createAccount(); break;
case 2: withdrawl(); break;
case 3: deposit(); break;
case 4: checkAccount(); break;
case 5: checkMaster(); break;
}while(ch<=5);
}
private static void createAccount() throws IOException
Calendar c=[Link]();
int date=[Link]([Link]);
int month=[Link]([Link]);
int year=[Link]([Link]);
String n,p;
int m;
[Link]("Your Account Number is : "+Ano);
[Link]("Your Name : ");
n=[Link]();
[Link]("Opening Balance : ");
m=[Link]([Link]());
[Link]("Your Password : ");
p=[Link]();
Acc[Ano]=new Account(n,Ano,date,month,year,m,p);
Ano++;
private static void withdrawl() throws IOException
String p;
int no,amt;
[Link]("Your Account Number : ");
no=[Link]([Link]());
[Link]("Password : ");
p=[Link]();
if(no<Ano && [Link](Acc[no].Password))
[Link]("Welcome "+Acc[no].Name);
[Link]("Withdrawl Amount : ");
amt=[Link]([Link]());
if(amt<=Acc[no].Money)
Acc[no].Money-=amt;
else
[Link]("Only "+Acc[no].Money+" amount left in
your Account");
else
[Link]("Your are Unauthorized Customer");
private static void deposit() throws IOException
String p;
int no,amt;
[Link]("Your Account Number : ");
no=[Link]([Link]());
[Link]("Password : ");
p=[Link]();
if(no<Ano && [Link](Acc[no].Password))
[Link]("Welcome "+Acc[no].Name);
[Link]("Deposit Amount : ");
amt=[Link]([Link]());
Acc[no].Money+=amt;
else
[Link]("Your are Unauthorized Customer");
private static void checkAccount() throws IOException
String p;
int no,amt;
[Link]("Your Account No. : ");
no=[Link]([Link]());
[Link]("Password : ");
p=[Link]();
if(no<Ano && [Link](Acc[no].Password))
[Link]("Your Name : "+Acc[no].Name);
[Link]("Balance Amount : "+Acc[no].Money);
int rate=(Acc[no].Money>=20000)?18:10;
[Link]("Interest Rate : "+rate+"%");
int interest=Acc[no].Money*rate/100;
[Link]("Current Balance :
"+(Acc[no].Money+interest));
else
[Link]("Your are Unauthorized Customer");
private static void checkMaster()
[Link]("Acc\tName\t\tDate\t\tMoney\t\tPassword");
for(int i=1;i<Ano;i++)
Acc[i].displayData();
private static void startAccount()
{
Acc[Ano]=new Account("Sachin",Ano,date,month,year,500,"ABC");
Ano++;
Acc[Ano]=new Account("Sourav",Ano,date,month,year,500,"XYZ");
Ano++;
Acc[Ano]=new
Account("Shewag",Ano,date,month,year,500,"MNO"); Ano++;
}
RAILWAY RESERVATION SYSTEM
import [Link].*;
public class RailwayReservation
InputStreamReader isr=new InputStreamReader ([Link]);
BufferedReader br=new BufferedReader (isr);
//[Link]("Please enter a word");
int pno[]=new int[275];
String name[]=new String[275];
String phno[]=new String[275];
int age[]=new int[275];
int cl[]=new int[275];
int pcount=0;
int pnum=1;
int max1=75;
int max2=125;
int max3=175;
public void doMenu() throws Exception
int cho=0;
do
{
[Link]("\f");
doHeading();
[Link]("[Link] ticket");
[Link]("[Link] ticket");
[Link]("[Link] passenger");
[Link]("[Link] chart");
[Link]("[Link] unbooked tickets");
[Link]("[Link]");
[Link]("Please enter your choice");
cho=[Link]([Link]());
switch(cho)
case 1: doBook(); break;
case 2: doCancel(); break;
case 3: doSearch(); break;
case 4: doDispList(); break;
case 5: doDispUnbooked(); break;
case 6: doExit(); break;
default : [Link]("Invalid choice");
}
char e=(char)[Link]();
}while(cho!=6);
private void doHeading()throws Exception
[Link]("########################################
#################");
[Link]("****** Railway Reservation For Geetanjali
Express *******");
[Link]("########################################
#################");
private void doBook()throws Exception
[Link]("Please enter the class of ticket");
[Link]("1. AC\t 2. First\t 3. Sleeper\t");
int c=[Link]([Link]());
[Link]("Please enter no. of tickets");
int t=[Link]([Link]());
int ticketAvailable=0;
if(c==1 && max1>=t)
{
ticketAvailable=1;
if(c==2 && max2>=t)
ticketAvailable=1;
if(c==3 && max3>=t)
ticketAvailable=1;
if(ticketAvailable==1)
for(int i=0;i<t;i++)
pno[pcount]=pnum;
[Link]("Please enter your name");
name[pcount]=[Link]();
[Link]("Please enter your age");
age[pcount]=[Link]([Link]());
cl[pcount]=c;
[Link]("Please enter your phno");
phno[pcount]=[Link]();
pcount++;
pnum++;
[Link]("Ticket successfully booked");
}//for
if(c==1)
max1-=t;
[Link]("Please pay Rs."+t*1500);
if(c==2)
max2-=t;
[Link]("Please pay Rs."+t*1200);
if(c==3)
max3-=t;
[Link]("Please pay Rs."+t*1000);
}
}
private void doCancel()throws Exception
int t_pno[]=new int[275];
String t_name[]=new String[275];
String t_phno[]=new String[275];
int t_age[]=new int[275];
int t_cl[]=new int[275];
int t_pcount=0;
int passengerFound=0;
[Link]("Please enter your passenger no.");
int p=[Link]([Link]());
for(int i=0;i<pcount;i++)
if(pno[i]!=p)
{//transfer
t_pno[t_pcount]=pno[i];
t_name[t_pcount]=name[i];
t_phno[t_pcount]=phno[i];
t_age[t_pcount]=age[i];
t_cl[t_pcount]=cl[i];
t_pcount++;
else
passengerFound=1;
if(cl[i]==1)
max1++;
[Link]("Please collect refund of Rs."+1800);
if(cl[i]==2)
max2++;
[Link]("Please collect refund of Rs."+1500);
if(cl[i]==3)
max3++;
[Link]("Please collect refund of Rs."+1000);
}//else
}//if
if(passengerFound==1)
pno=t_pno;
name=t_name;
age=t_age;
cl=t_cl;
phno=t_phno;
pcount=t_pcount;
[Link]("ticket successfully cancelled");
}//method
private void doDispList()throws Exception
[Link]("Passenger list in AC class");
[Link]("pno \t name \t\t age \t phno");
for(int i=0;i<pcount;i++)
if(cl[i]==1)
{
[Link](pno[i]+"\t"+name[i]+"\t\t"+age[i]+"\t"+phno[i]);
[Link]("Passenger list in First class");
[Link]("pno \t name \t\t age \t phno");
for(int i=0;i<pcount;i++)
if(cl[i]==2)
[Link](pno[i]+"\t"+name[i]+"\t\t"+age[i]+"\t"+phno[i]);
[Link]("Passenger list in Sleeper class");
[Link]("pno \t name \t\t age \t phno");
for(int i=0;i<pcount;i++)
if(cl[i]==3)
[Link](pno[i]+"\t"+name[i]+"\t\t"+age[i]+"\t"+phno[i]);
}
}
private void doSearch()throws Exception
int passengerFound=0;
[Link]("Please enter passenger no. to search");
int p=[Link]([Link]());
for(int i=0;i<pcount;i++)
if(pno[i]==p)
[Link]("Detail found");
passengerFound=1;
[Link]("passenger no.="+pno[i]);
[Link]("name="+name[i]);
[Link]("class="+cl[i]);
[Link]("phno="+phno[i]);
[Link]("age="+age[i]);
}//for
if(passengerFound==0)
[Link]("No such passenger");
}//method
private void doDispUnbooked()throws Exception
[Link]("No. of booked tickets status");
[Link]("AC class"+max1);
[Link]("First class"+max2);
[Link]("Sleeper class"+max3);
private void doExit()
[Link]("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&");
[Link]("Name : Prathamesh , Class : X, Roll No. : 22");
[Link]("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&");
}
CALENDER
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class Calender extends JPanel
{
protected int yy;
protected int mm, dd;
/** The buttons to be displayed */
protected JButton labs[][];
/** The number of day squares to leave blank at the start of this
month */
protected int leadGap = 0;
/** A Calendar object used throughout */
Calendar calendar = new GregorianCalendar();
/** Today's year */
protected final int thisYear = [Link]([Link]);
/** Today's month */
protected final int thisMonth = [Link]([Link]);
/** One of the buttons. We just keep its reference for
getBackground(). */
private JButton b0;
/** The month choice */
private JComboBox monthChoice;
/** The year choice */
private JComboBox yearChoice;
/**
* Construct a Cal, starting with today.
*/
Calender()
super();
setYYMMDD([Link]([Link]),
[Link]([Link]),
[Link](Calendar.DAY_OF_MONTH));
buildGUI();
recompute();
/**
* Construct a Cal, given the leading days and the total days
* @exception IllegalArgumentException
* If year out of range
*/
Calender(int year, int month, int today)
super();
setYYMMDD(year, month, today);
buildGUI();
recompute();
private void setYYMMDD(int year, int month, int today)
yy = year;
mm = month;
dd = today;
String[] months = { "January", "February", "March", "April", "May",
"June",
"July", "August", "September", "October", "November",
"December" };
/** Build the GUI. Assumes that setYYMMDD has been called. */
private void buildGUI()
getAccessibleContext().setAccessibleDescription(
"Calendar not accessible yet. Sorry!");
setBorder([Link]());
setLayout(new BorderLayout());
JPanel tp = new JPanel();
[Link](monthChoice = new JComboBox());
for (int i = 0; i < [Link]; i++)
[Link](months[i]);
[Link](months[mm]);
[Link](new ActionListener()
public void actionPerformed(ActionEvent ae)
int i = [Link]();
if (i >= 0) {
mm = i;
// [Link]("Month=" + mm);
recompute();
});
[Link]().setAccessibleName("Months");
[Link]().setAccessibleDescription(
"Choose a month of the year");
[Link](yearChoice = new JComboBox());
[Link](true);
for (int i = yy - 5; i < yy + 5; i++)
[Link]([Link](i));
[Link]([Link](yy));
[Link](new ActionListener()
public void actionPerformed(ActionEvent ae)
int i = [Link]();
if (i >= 0) {
yy = [Link]([Link]()
.toString());
//[Link]("Year=" + yy);
recompute();
});
add([Link], tp);
JPanel bp = new JPanel();
[Link](new GridLayout(7, 7));
labs = new JButton[6][7]; // first row is days
[Link](b0 = new JButton("S"));
[Link](new JButton("M"));
[Link](new JButton("T"));
[Link](new JButton("W"));
[Link](new JButton("R"));
[Link](new JButton("F"));
[Link](new JButton("S"));
ActionListener dateSetter = new ActionListener()
public void actionPerformed(ActionEvent e)
String num = [Link]();
if ()
// set the current day highlighted
setDayActive([Link](num));
// When this becomes a Bean, you can
// fire some kind of DateChanged event here.
// Also, build a similar daySetter for day-of-week btns.
};
// Construct all the buttons, and add them.
for (int i = 0; i < 6; i++)
for (int j = 0; j < 7; j++) {
[Link](labs[i][j] = new JButton(""));
labs[i][j].addActionListener(dateSetter);
add([Link], bp);
public final static int dom[] = { 31, 28, 31, 30,31, 30, 31, 31,30, 31,
30, 31};
/** Compute which days to put where, in the Cal panel */
protected void recompute()
// [Link]("Cal::recompute: " + yy + ":" + mm + ":" +
dd);
if (mm < 0 || mm > 11)
throw new IllegalArgumentException("Month " + mm
+ " bad, must be 0-11");
clearDayActive();
calendar = new GregorianCalendar(yy, mm, dd);
// Compute how much to leave before the first.
// getDay() returns 0 for Sunday, which is just right.
leadGap = new GregorianCalendar(yy, mm,
1).get(Calendar.DAY_OF_WEEK) - 1;
// [Link]("leadGap = " + leadGap);
int daysInMonth = dom[mm];
if (isLeap([Link]([Link])) && mm > 1)
++daysInMonth;
// Blank out the labels before 1st day of month
for (int i = 0; i < leadGap; i++) {
labs[0][i].setText("");
// Fill in numbers for the day of month.
for (int i = 1; i <= daysInMonth; i++) {
JButton b = labs[(leadGap + i - 1) / 7][(leadGap + i - 1) % 7];
[Link]([Link](i));
// 7 days/week * up to 6 rows
for (int i = leadGap + 1 + daysInMonth; i < 6 * 7; i++) {
labs[(i) / 7][(i) % 7].setText("");
}
// Shade current day, only if current month
if (thisYear == yy && mm == thisMonth)
setDayActive(dd); // shade the box for today
// Say we need to be drawn on the screen
repaint();
/**
* isLeap() returns true if the given year is a Leap Year.
* "a year is a leap year if it is divisible by 4 but not by 100, except
* that years divisible by 400 *are* leap years." -- Kernighan &
Ritchie,
* _The C Programming Language_, p 37.
*/
public boolean isLeap(int year)
if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0)
return true;
return false;
/** Set the year, month, and day */
public void setDate(int yy, int mm, int dd)
// [Link]("Cal::setDate");
[Link] = yy;
[Link] = mm; // starts at 0, like Date
[Link] = dd;
recompute();
/** Unset any previously highlighted day */
private void clearDayActive()
JButton b;
// First un-shade the previously-selected square, if any
if (activeDay > 0)
b = labs[(leadGap + activeDay - 1) / 7][(leadGap + activeDay - 1) %
7];
[Link]([Link]());
[Link]();
activeDay = -1;
private int activeDay = -1;
/** Set just the day, on the current month */
public void setDayActive(int newDay)
clearDayActive();
// Set the new one
if (newDay <= 0)
dd = new GregorianCalendar().get(Calendar.DAY_OF_MONTH);
else
dd = newDay;
// Now shade the correct square
Component square = labs[(leadGap + newDay - 1) / 7][(leadGap +
newDay - 1) % 7];
[Link]([Link]);
[Link]();
activeDay = newDay;
/** For testing, a main program */
public static void main(String[] av)
JFrame f = new JFrame("Calender");
Container c = [Link]();
[Link](new FlowLayout());
// for this test driver, hardcode 1995/02/10.
// [Link](new Calender(1995, 2 - 1, 10));
// and beside it, the current month.
[Link](new Calender());
[Link]();
[Link](true);