Q4 - void main clrscr long int a,b,c int d...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include<iostream.h> #include<conio.h> # int ispalindrome(long int a) { int x,y,z,q1,q2,q3; cout<<a<<endl; x=a%10; y=(a/10)%10; z=(a/100)%10; q1=(a/1000)%10; q2=(a/10000)%10; q3=a/100000; return 1; else return 0;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } void main() { clrscr(); long int a,b,c; int d; for(b=999;b>99;b--) for(c=999;c>99;c--) { a=b*c; d=ispalindrome(a); if(d==1) { cout<<b*c<<" "<<b<<" "<<c<<endl; getch(); break; } } getch(); } //...
View Full Document

This note was uploaded on 10/25/2010 for the course CMPN SEM1 taught by Professor Thakur during the Spring '06 term at University of Mumbai.

Ask a homework question - tutors are online