Professional Documents
Culture Documents
Lab Format PDF
Lab Format PDF
(EL-116)
LABORATORY MANUAL
[Instructor Name]
[Lab Title]
(LAB # 01)
Student Name: ______________________________________________
Lab #
(EL116)
of Computer and Emerging Sciences
Chiniot-Faisalabad Campus Fall 2017
01
Lab #01: Lab Title
Problem Statement:
Write clearly the problem statement of each question.
Code:
#include<iostream>
usingnamespacestd;
intmain()
{
inti,temp,d,revrs=0;
cout<<"enter the number to check :";
cin>>i;
temp=i;
while(temp>0)
{
d=temp%10;
temp/=10;
revrs=revrs*10+d;
}
if(revrs==i)
cout<<i<<" is palindorme";
else
cout<<i<<" is not palindrome";
}}
Output:
Screen shots of the output for various inputs are shown in Fig. 1:
_____________________________________________________________________________________________
Page 2 of 2