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
This is a free help Forum for Indian Students.
Complete IIT AIEEE ICSE ISC PMT help forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.
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  SearchSearch  Latest imagesLatest images  RegisterRegister  Log in  India NewsIndia News  
Keywords
YEAR 2006 science CASE 2009 ICSE computer UNION 2007 paper physics RESULT SELECT prelim question 2004 2010 papers CLASS graph
Latest topics
» Nitration of aniline - IIT JEE 2018 Advanced - solved
question - ISC 2004 question on decoding EmptyFri Jun 08, 2018 2:34 am by adianadiadi

» Diamagnetic - Paramagnetic - Ni(CO)4, [Ni(CN)4]2- and [NiCl4
question - ISC 2004 question on decoding EmptyFri Apr 06, 2018 1:05 am by adianadiadi

» IIT JEE chemistry solved interactive question paper
question - ISC 2004 question on decoding EmptySun Oct 29, 2017 12:11 pm by adianadiadi

» IIT JEE 2015 SOLVED QUESTION PAPER
question - ISC 2004 question on decoding EmptyWed Oct 19, 2016 1:44 pm by adianadiadi

» IIT JEE chemistry solved questions
question - ISC 2004 question on decoding EmptySat Jul 18, 2015 6:15 pm by adianadiadi

» General Description of Chinese Market for Foaming Agent ADC
question - ISC 2004 question on decoding EmptyFri May 09, 2014 2:09 pm by happybaicaitou

» How to get Lowest Cost MBBS Admission?
question - ISC 2004 question on decoding EmptyMon Feb 24, 2014 6:39 pm by MENTOR 2014

»  girl boy vashikaran specialist agori baba ji +91-9461165
question - ISC 2004 question on decoding EmptyTue Jan 21, 2014 6:00 pm by krshastri

»  STRONG LOST LOVE SPELL +91-9461165176
question - ISC 2004 question on decoding EmptyTue Jan 21, 2014 6:00 pm by krshastri

Top posters
abhas
question - ISC 2004 question on decoding Vote_lcapquestion - ISC 2004 question on decoding Voting_barquestion - ISC 2004 question on decoding Vote_rcap 
Anu..i luv icse...:)
question - ISC 2004 question on decoding Vote_lcapquestion - ISC 2004 question on decoding Voting_barquestion - ISC 2004 question on decoding Vote_rcap 
G-7
question - ISC 2004 question on decoding Vote_lcapquestion - ISC 2004 question on decoding Voting_barquestion - ISC 2004 question on decoding Vote_rcap 
siya
question - ISC 2004 question on decoding Vote_lcapquestion - ISC 2004 question on decoding Voting_barquestion - ISC 2004 question on decoding Vote_rcap 
Candy
question - ISC 2004 question on decoding Vote_lcapquestion - ISC 2004 question on decoding Voting_barquestion - ISC 2004 question on decoding Vote_rcap 
jOhNy
question - ISC 2004 question on decoding Vote_lcapquestion - ISC 2004 question on decoding Voting_barquestion - ISC 2004 question on decoding Vote_rcap 
Apurva
question - ISC 2004 question on decoding Vote_lcapquestion - ISC 2004 question on decoding Voting_barquestion - ISC 2004 question on decoding Vote_rcap 
WinRrule
question - ISC 2004 question on decoding Vote_lcapquestion - ISC 2004 question on decoding Voting_barquestion - ISC 2004 question on decoding Vote_rcap 
ambili
question - ISC 2004 question on decoding Vote_lcapquestion - ISC 2004 question on decoding Voting_barquestion - ISC 2004 question on decoding Vote_rcap 
saif
question - ISC 2004 question on decoding Vote_lcapquestion - ISC 2004 question on decoding Voting_barquestion - ISC 2004 question on decoding Vote_rcap 



Search if you can't find it here

ISC 2004 question on decoding

View previous topic View next topic Go down
AuthorMessage
aarthi
Active member
Active member



question - ISC 2004 question on decoding Vide
PostSubject: ISC 2004 question on decoding question - ISC 2004 question on decoding EmptyTue Feb 23, 2010 5:54 pm

question - ISC 2004 question on decoding Scan0011

Can anyone give me the algorithm for this question. Its taken from ISC 2004 computer practical question paper.

Thanks.
Back to top Go down
diptojit
Active member
Active member



question - ISC 2004 question on decoding Vide
PostSubject: Re: ISC 2004 question on decoding question - ISC 2004 question on decoding EmptyTue Feb 23, 2010 11:21 pm

Hope this helps you @ Aarthi
Here's the program.....

// ISC 2004 Q2
// To accept a string of integers and reverse them.Then to extract out meaningful ASCII codes
// of capital and small alphabets and also including spaces.
import java.io.*;
class ISC_2004_decoder
{ int i;
String rev(String s)// returns reversed string
{ String s1="";int ln;
ln=s.length();
for(i=0;i<ln;i++)
{ s1=s.charAt(i)+s1; }
return(s1);
}
char asc(int a)// returns character corresponding to ASCII code
{ char ch;
ch=(char)(a);// explicit conversion of Integer to Character
return(ch);
}
int meaning(int b)// checks whether ASCII code is meaningful or not
{
int mn=0;
if((b>=65&&b<=90)||(b>=97&&b<=122)||(b==32))
{ mn=1;}
return(mn);
}
void main()throws IOException
{
int ln1,asint;char ch1;String s2="",srev;
InputStreamReader read=new InputStreamReader(System.in);
BufferedReader in=new BufferedReader(read);
System.out.println("Enter message to be decoded");
String st=in.readLine();// accepting integers in the form of a string
ln1=st.length();
System.out.println("The Decoded message is :");
srev=rev(st);
for(i=0;i<ln1;i++)
{ ch1=srev.charAt(i);
s2=s2+ch1;
asint=Integer.parseInt(s2);
if(meaning(asint)==1)// calling function meaning() to find out whether asint is a valid ASCII code
{
System.out.print(asc(asint));// calling function asc() to get the character with code integer asint
s2="";
}
}
}
}
Back to top Go down
aarthi
Active member
Active member



question - ISC 2004 question on decoding Vide
PostSubject: ISC 2004 question on decoding question - ISC 2004 question on decoding EmptyWed Feb 24, 2010 7:23 pm

Thanks a lot diptojit. Both your codes have been very useful! They are very simply yet efficient. Thanks a lot! Smile
Back to top Go down
Sponsored content




question - ISC 2004 question on decoding Vide
PostSubject: Re: ISC 2004 question on decoding question - ISC 2004 question on decoding Empty

Back to top Go down

ISC 2004 question on decoding

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 :: Computer :: Computer help forum-