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
computer 2006 2009 paper CLASS RESULT papers 2004 CASE UNION science SELECT physics 2010 ICSE graph question prelim YEAR 2007
Latest topics
» Nitration of aniline - IIT JEE 2018 Advanced - solved
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
ISC 2004 question on decoding EmptyFri Apr 06, 2018 1:05 am by adianadiadi

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

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

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

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

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

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

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

Top posters
abhas
ISC 2004 question on decoding Vote_lcapISC 2004 question on decoding Voting_barISC 2004 question on decoding Vote_rcap 
Anu..i luv icse...:)
ISC 2004 question on decoding Vote_lcapISC 2004 question on decoding Voting_barISC 2004 question on decoding Vote_rcap 
G-7
ISC 2004 question on decoding Vote_lcapISC 2004 question on decoding Voting_barISC 2004 question on decoding Vote_rcap 
siya
ISC 2004 question on decoding Vote_lcapISC 2004 question on decoding Voting_barISC 2004 question on decoding Vote_rcap 
Candy
ISC 2004 question on decoding Vote_lcapISC 2004 question on decoding Voting_barISC 2004 question on decoding Vote_rcap 
jOhNy
ISC 2004 question on decoding Vote_lcapISC 2004 question on decoding Voting_barISC 2004 question on decoding Vote_rcap 
Apurva
ISC 2004 question on decoding Vote_lcapISC 2004 question on decoding Voting_barISC 2004 question on decoding Vote_rcap 
WinRrule
ISC 2004 question on decoding Vote_lcapISC 2004 question on decoding Voting_barISC 2004 question on decoding Vote_rcap 
ambili
ISC 2004 question on decoding Vote_lcapISC 2004 question on decoding Voting_barISC 2004 question on decoding Vote_rcap 
saif
ISC 2004 question on decoding Vote_lcapISC 2004 question on decoding Voting_barISC 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



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

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



ISC 2004 question on decoding Vide
PostSubject: Re: ISC 2004 question on decoding 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



ISC 2004 question on decoding Vide
PostSubject: ISC 2004 question on decoding 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




ISC 2004 question on decoding Vide
PostSubject: Re: ISC 2004 question on decoding 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-