SlideShare a Scribd company logo
Exercise 1: 1. Draw a control flow Graph 1 importiava.util.*; 2 class Palindrome {
publicstaticvoid main (Stringargs []) { String original, reverse =" "; Scanner in =new Scanner
(System.in); System.out.println ("Enter a string to check palindrome"); original =in.nextLine ();
int length =original. length (); for ( int i= length 1;i>=0;i) { reverse = reverse +original
charAt(i)); } if (original. equals (reverse)) System.out.println ("Entered string is a palindrome.")i
else System.out.println("Entered string is not a palindrome.")i }

More Related Content

PDF
EA7. [ra 7.3 Record the following transactions in the cash receipts j.pdf
PDF
Dominic races through the streets of Los Angeles in his Dodge Charger.pdf
PDF
Doctors Office Visit Narrative Doctor Healy and her administra.pdf
PDF
Express the binary number (0111,1001)2 in Hexadocimat QUESTION 15 Ex.pdf
PDF
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdf
PDF
Example Accessor Mutator Methods public class Cirde WithPirste Dat.pdf
PDF
2024 Trend Updates: What Really Works In SEO & Content Marketing
PDF
Storytelling For The Web: Integrate Storytelling in your Design Process
EA7. [ra 7.3 Record the following transactions in the cash receipts j.pdf
Dominic races through the streets of Los Angeles in his Dodge Charger.pdf
Doctors Office Visit Narrative Doctor Healy and her administra.pdf
Express the binary number (0111,1001)2 in Hexadocimat QUESTION 15 Ex.pdf
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdf
Example Accessor Mutator Methods public class Cirde WithPirste Dat.pdf
2024 Trend Updates: What Really Works In SEO & Content Marketing
Storytelling For The Web: Integrate Storytelling in your Design Process

Recently uploaded (20)

PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Institutional Correction lecture only . . .
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Lesson notes of climatology university.
PPTX
master seminar digital applications in india
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
RMMM.pdf make it easy to upload and study
PDF
Basic Mud Logging Guide for educational purpose
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Cell Structure & Organelles in detailed.
PDF
Complications of Minimal Access Surgery at WLH
Final Presentation General Medicine 03-08-2024.pptx
Institutional Correction lecture only . . .
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Lesson notes of climatology university.
master seminar digital applications in india
Microbial disease of the cardiovascular and lymphatic systems
Supply Chain Operations Speaking Notes -ICLT Program
PPH.pptx obstetrics and gynecology in nursing
01-Introduction-to-Information-Management.pdf
Microbial diseases, their pathogenesis and prophylaxis
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
RMMM.pdf make it easy to upload and study
Basic Mud Logging Guide for educational purpose
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Anesthesia in Laparoscopic Surgery in India
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Abdominal Access Techniques with Prof. Dr. R K Mishra
Cell Structure & Organelles in detailed.
Complications of Minimal Access Surgery at WLH
Ad
Ad

Exercise 1 1. Draw a control flow Graph 1 importiava.util.; 2 class.pdf

  • 1. Exercise 1: 1. Draw a control flow Graph 1 importiava.util.*; 2 class Palindrome { publicstaticvoid main (Stringargs []) { String original, reverse =" "; Scanner in =new Scanner (System.in); System.out.println ("Enter a string to check palindrome"); original =in.nextLine (); int length =original. length (); for ( int i= length 1;i>=0;i) { reverse = reverse +original charAt(i)); } if (original. equals (reverse)) System.out.println ("Entered string is a palindrome.")i else System.out.println("Entered string is not a palindrome.")i }