
Call 1800-123-2003
"Smartindia is the best online tool for school students." Ms Deepa Chandran, Principal Anchal
"Smartindia is one of the best supplementary education tool for school students." Ms Pooja, Principal
Write a program in Java(BLUE-J) to display the following pattern: 1 2 1 3 2 1 4 3 2 1 5 4 3 2 1 |
#include<iostream.h> #include<conio.h> #include<string.h> #include<stdio.h> void main() { clrscr(); char str[30],str1[30]; cout<<"ENTER THE WORD:"; gets(str); strcpy(str1,str); strrev(str); if(strcmp(str,str1)==0) cout<<"THE WORD IS PALINDROME"; else cout<<"THE WORD IS NOT PALINDROME"; getch(); } |