You are on page 1of 2

INTRODUCTION TO COMPUTING

(EL-116)

LABORATORY MANUAL

[Instructor Name]

[Lab Title]
(LAB # 01)
Student Name: ______________________________________________

Roll No: ________________ Section: ____

Date performed: _____________, 2017

NATIONAL UNIVERSITY OF COMPUTER AND EMERGING SCIENCES,


CHINIOT-FAISALABAD CAMPUS
ITC Lab National University Roll No: __________

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:

Fig.1. Screen shot of the output

Learning Outcome: What have you learned in this lab

_____________________________________________________________________________________________
Page 2 of 2

You might also like