Complete IIT AIEEE ICSE ISC PMT help forum
This is a free help Forum for Indian Students.
Complete IIT AIEEE ICSE ISC PMT help forum

Complete help forum for students preparing for icse iit aieee cbse pmt and other related exams.Stay updated about all 2011 exams.
 
HomeHome  PortalPortal  FAQFAQ  SearchSearch  RegisterRegister  MemberlistMemberlist  UsergroupsUsergroups  Log in  India NewsIndia News  
Keywords
2006 YEAR RESULT CLASS question prelim papers 2010 physics
Latest topics
Top posters
abhas
question 1> isc specimen paper 2010 Vote_lcapquestion 1> isc specimen paper 2010 Voting_barquestion 1> isc specimen paper 2010 Vote_rcap 
Anu..i luv icse...:)
question 1> isc specimen paper 2010 Vote_lcapquestion 1> isc specimen paper 2010 Voting_barquestion 1> isc specimen paper 2010 Vote_rcap 
G-7
question 1> isc specimen paper 2010 Vote_lcapquestion 1> isc specimen paper 2010 Voting_barquestion 1> isc specimen paper 2010 Vote_rcap 
siya
question 1> isc specimen paper 2010 Vote_lcapquestion 1> isc specimen paper 2010 Voting_barquestion 1> isc specimen paper 2010 Vote_rcap 
Candy
question 1> isc specimen paper 2010 Vote_lcapquestion 1> isc specimen paper 2010 Voting_barquestion 1> isc specimen paper 2010 Vote_rcap 
jOhNy
question 1> isc specimen paper 2010 Vote_lcapquestion 1> isc specimen paper 2010 Voting_barquestion 1> isc specimen paper 2010 Vote_rcap 
Apurva
question 1> isc specimen paper 2010 Vote_lcapquestion 1> isc specimen paper 2010 Voting_barquestion 1> isc specimen paper 2010 Vote_rcap 
WinRrule
question 1> isc specimen paper 2010 Vote_lcapquestion 1> isc specimen paper 2010 Voting_barquestion 1> isc specimen paper 2010 Vote_rcap 
ambili
question 1> isc specimen paper 2010 Vote_lcapquestion 1> isc specimen paper 2010 Voting_barquestion 1> isc specimen paper 2010 Vote_rcap 
saif
question 1> isc specimen paper 2010 Vote_lcapquestion 1> isc specimen paper 2010 Voting_barquestion 1> isc specimen paper 2010 Vote_rcap 



Search if you can't find it here

question 1> isc specimen paper 2010

View previous topic View next topic Go down
AuthorMessage
prateek9417




question 1> isc specimen paper 2010 Vide
PostSubject: question 1> isc specimen paper 2010 question 1> isc specimen paper 2010 EmptyFri Mar 12, 2010 8:49 pm

Question 1
Design a program which inputs a date in six digit number format i.e. 141296 . Test the validity of the date and print the date in full form . If date is invalid then print a message as “ Invalid Date“
1. Example :
INPUT : 141296
OUTPUT : 14th December , 96
: VALID DATE
2. Example :
INPUT : 230488
OUTPUT : 23rd April , 88
: VALID DATE
3. Example :
INPUT : 300284
OUTPUT : INVALID DATE

import java.io.*;
class Currency
{
private int th,hu,fhu,fi,te,f,on,amm;
public Currency()
{
th=hu=fi=te=on=0;
}
public void input(int amm)
{
this.amm=amm;
}
public void print()
{
if(amm/1000>0)
{
th=amm/1000;
System.out.println("1000 x "+th);
amm=amm%1000;
}
if(amm/500>0)
{
fhu=amm/500;
System.out.println("500 x "+fhu);
amm=amm%500;
}
if(amm/100>0)
{
hu=amm/100;
System.out.println("100 x "+hu);
amm=amm%100;
}
if(amm/50>0)
{
fi=amm/50;
System.out.println("50 x "+fi);
amm=amm%50;
}
if(amm/10>0)
{
te=amm/10;
System.out.println("10 x "+te);
amm=amm%10;
}
if(amm/5>0)
{
f=amm/5;
System.out.println("5 x "+f);
amm=amm%5;
}
if(amm>0)
{
System.out.println("1 x "+amm);
}

}
public String display(int num)
{
String s[]={"Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"};
String t="";
while(num>0)
{
int n=num%10;
t=s[n]+" "+t;
num/=10;
}
return t;
}
}
Back to top Go down
View user profile
RC
Active member
Active member
RC


question 1> isc specimen paper 2010 Vide
PostSubject: Re: question 1> isc specimen paper 2010 question 1> isc specimen paper 2010 EmptySat Mar 13, 2010 11:55 am

import java.io.*;
class S1001
{
void main()throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Pls give the 6 digit input : ");
String str=br.readLine();
String months[]={"January","February","March","April","May","June","July","August","September","October","November","December"};
int d[]={31,28,31,30,31,30,31,31,30,31,30,31};
//String dd,m,y;
int dd,m,y;
dd=Integer.parseInt(str.substring(0,2));
m=Integer.parseInt(str.substring(2,4));
y=Integer.parseInt(str.substring(4,6));
if(y%4==0)
d[1]=29;
if(dd>d[m-1])
{
System.out.println("Invalid Date");
return;
}
System.out.print(dd);
if(dd%10==1)
System.out.print("st");
else if(dd%10==2)
System.out.print("nd");
else if(dd%10==3)
System.out.print("rd");
else
System.out.print("th");
System.out.print(" "+months[m-1]+","+y);
}
}
Back to top Go down
View user profile

question 1> isc specimen paper 2010

View previous topic View next topic Back to top
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Complete IIT AIEEE ICSE ISC PMT help forum :: ISC :: ISC 2010 [Class xii] :: Computer-