SlideShare a Scribd company logo
Lab Report # 05
EE-112L - Programming Fundamentals Lab
By
Ausaf Ahmad
Section: A
Reg. # 20MDELE136
Class No.: 18
Instructor
Engr. Jawad Ali
Lecturer
Department of Electrical Engineering,
University of Engineering and Technology
Mardan
DATED: 25/04/2021
Task 1: Take your name and roll number as
inputs and display them 7 times on the screen
using for loop.
Code:
//___PF Lab5___//
//___Task 1___//
//___20MDELE136___//
//___AUSAF AHMAD___//
#include <stdio.h>
int main()
{
printf("ntt PF Lab 05 ntt Task 1 ntt
20MDELE136 ntt AUSAF AHMAD
ntt*************n");
int a;
for (a=1;a<=7;a++)
{
printf ( "20MDELE136n");
printf ( "Ausaf Ahmadn" );
}
return 0;
}
Snap-A (i.e. Coding)
Result:
Snap-B (i.e. Result)
Task 2: Display the first ten positive
integers, using for loop.
Code:
//___PF Lab5___//
//___Task 2___//
//___20MDELE136___//
//___AUSAF AHMAD___//
#include <stdio.h>
int main()
{
printf("ntt PF Lab 05 ntt Task 2 ntt
20MDELE136 ntt AUSAF AHMAD
ntt*************nn");
int UETMardan;
printf("The first 10 positive integers are:n" );
for(UETMardan=1;UETMardan<=10;UETMardan++)
{
printf("tt%dn",UETMardan);
}
printf("n");
}
Snap-A (i.e. Code)
Result:
Snap-B (Output)
Task 3: Write a program that calculates
the factorial of a number.
Code:
//___PF Lab5___//
//___Task 3___//
//___20MDELE136___//
//___AUSAF AHMAD___//
#include <stdio.h>
void main(){
printf("ntt PF Lab 05 ntt Task 1 ntt
20MDELE136 ntt AUSAF AHMAD
ntt*************nn");
int i,f=1,num;
printf("Input the number : ");
scanf("%d",&num);
for(i=1;i<=num;i++)
f=f*i;
printf("The Factorial of %d is: %dn",num,f);
}
Snap-A (i.e. Code)
Result:
Snap-B (Output of program)
*****THE END*****

More Related Content

What's hot

C language program
C language programC language program
C language program
raheeema suleman
 
Lecture03 computer applicationsie1_dratifshahzad
Lecture03 computer applicationsie1_dratifshahzadLecture03 computer applicationsie1_dratifshahzad
Lecture03 computer applicationsie1_dratifshahzad
Atif Shahzad
 
Cinfo
CinfoCinfo
Cinfo
teach4uin
 
Static variables
Static variablesStatic variables
Lecture05 abap on line
Lecture05 abap on lineLecture05 abap on line
Lecture05 abap on line
Milind Patil
 
Linking the prospective and retrospective provenance of scripts
Linking the prospective and retrospective provenance of scriptsLinking the prospective and retrospective provenance of scripts
Linking the prospective and retrospective provenance of scripts
Khalid Belhajjame
 
Tapp 2014 (belhajjame)
Tapp 2014 (belhajjame)Tapp 2014 (belhajjame)
Tapp 2014 (belhajjame)
Khalid Belhajjame
 
C programming
C programming C programming
C programming
Sonakshi Sarkar
 
Ikc 2015
Ikc 2015Ikc 2015
Synapse india dotnet development overloading operater part 3
Synapse india dotnet development overloading operater part 3Synapse india dotnet development overloading operater part 3
Synapse india dotnet development overloading operater part 3
Synapseindiappsdevelopment
 
Bti1022 lab sheet 7
Bti1022 lab sheet 7Bti1022 lab sheet 7
Bti1022 lab sheet 7
alish sha
 
Static variable
Static variableStatic variable
Static variable
Himanshu Shekhar
 
#OSSPARIS19: Introduction to scikit-learn - Olivier Grisel, Inria
#OSSPARIS19: Introduction to scikit-learn - Olivier Grisel, Inria#OSSPARIS19: Introduction to scikit-learn - Olivier Grisel, Inria
#OSSPARIS19: Introduction to scikit-learn - Olivier Grisel, Inria
Paris Open Source Summit
 
Introduction to Computer and Programing - Lecture 04
Introduction to Computer and Programing - Lecture 04Introduction to Computer and Programing - Lecture 04
Introduction to Computer and Programing - Lecture 04
hassaanciit
 
Plsql programs
Plsql programsPlsql programs
Automated Repair - ISSTA Summer School
Automated Repair - ISSTA Summer SchoolAutomated Repair - ISSTA Summer School
Automated Repair - ISSTA Summer School
Abhik Roychoudhury
 
Compiler design lab programs
Compiler design lab programs Compiler design lab programs
Compiler design lab programs
Guru Janbheshver University, Hisar
 
C programming Lab 1
C programming Lab 1C programming Lab 1
C programming Lab 1
Zaibi Gondal
 
CP Handout#4
CP Handout#4CP Handout#4
CP Handout#4
trupti1976
 
Operators In Java Part - 8
Operators In Java Part - 8Operators In Java Part - 8
Operators In Java Part - 8
MuhammadAtif231
 

What's hot (20)

C language program
C language programC language program
C language program
 
Lecture03 computer applicationsie1_dratifshahzad
Lecture03 computer applicationsie1_dratifshahzadLecture03 computer applicationsie1_dratifshahzad
Lecture03 computer applicationsie1_dratifshahzad
 
Cinfo
CinfoCinfo
Cinfo
 
Static variables
Static variablesStatic variables
Static variables
 
Lecture05 abap on line
Lecture05 abap on lineLecture05 abap on line
Lecture05 abap on line
 
Linking the prospective and retrospective provenance of scripts
Linking the prospective and retrospective provenance of scriptsLinking the prospective and retrospective provenance of scripts
Linking the prospective and retrospective provenance of scripts
 
Tapp 2014 (belhajjame)
Tapp 2014 (belhajjame)Tapp 2014 (belhajjame)
Tapp 2014 (belhajjame)
 
C programming
C programming C programming
C programming
 
Ikc 2015
Ikc 2015Ikc 2015
Ikc 2015
 
Synapse india dotnet development overloading operater part 3
Synapse india dotnet development overloading operater part 3Synapse india dotnet development overloading operater part 3
Synapse india dotnet development overloading operater part 3
 
Bti1022 lab sheet 7
Bti1022 lab sheet 7Bti1022 lab sheet 7
Bti1022 lab sheet 7
 
Static variable
Static variableStatic variable
Static variable
 
#OSSPARIS19: Introduction to scikit-learn - Olivier Grisel, Inria
#OSSPARIS19: Introduction to scikit-learn - Olivier Grisel, Inria#OSSPARIS19: Introduction to scikit-learn - Olivier Grisel, Inria
#OSSPARIS19: Introduction to scikit-learn - Olivier Grisel, Inria
 
Introduction to Computer and Programing - Lecture 04
Introduction to Computer and Programing - Lecture 04Introduction to Computer and Programing - Lecture 04
Introduction to Computer and Programing - Lecture 04
 
Plsql programs
Plsql programsPlsql programs
Plsql programs
 
Automated Repair - ISSTA Summer School
Automated Repair - ISSTA Summer SchoolAutomated Repair - ISSTA Summer School
Automated Repair - ISSTA Summer School
 
Compiler design lab programs
Compiler design lab programs Compiler design lab programs
Compiler design lab programs
 
C programming Lab 1
C programming Lab 1C programming Lab 1
C programming Lab 1
 
CP Handout#4
CP Handout#4CP Handout#4
CP Handout#4
 
Operators In Java Part - 8
Operators In Java Part - 8Operators In Java Part - 8
Operators In Java Part - 8
 

Similar to Lab5 (pfl) 20_mdele136(ausaf)

Lab2 (pfl) 20_mdele136(ausaf)
Lab2 (pfl) 20_mdele136(ausaf)Lab2 (pfl) 20_mdele136(ausaf)
Lab2 (pfl) 20_mdele136(ausaf)
Ausaf Ahmad
 
Bti1022 lab sheet 3
Bti1022 lab sheet 3Bti1022 lab sheet 3
Bti1022 lab sheet 3
alish sha
 
Verilog lab mauual
Verilog lab mauualVerilog lab mauual
Verilog lab mauual
BHUSHAN MHASKE
 
Ranhnel R Navarez Resume
Ranhnel R Navarez ResumeRanhnel R Navarez Resume
Ranhnel R Navarez Resume
Ranhnel Navarez
 
BPOPS203 PRINCIPLES OF PROGRAMMING USING C LAB Manual.pdf
BPOPS203 PRINCIPLES OF PROGRAMMING USING C LAB Manual.pdfBPOPS203 PRINCIPLES OF PROGRAMMING USING C LAB Manual.pdf
BPOPS203 PRINCIPLES OF PROGRAMMING USING C LAB Manual.pdf
Syed Mustafa
 
Lab exe 2 dti 2143
Lab exe 2 dti 2143Lab exe 2 dti 2143
Lab exe 2 dti 2143
alish sha
 
Lab exe 2 dti 2143 dam31303
Lab exe 2 dti 2143 dam31303Lab exe 2 dti 2143 dam31303
Lab exe 2 dti 2143 dam31303
alish sha
 
DSP Spring 2023 Lab Manual for spring 2023
DSP Spring 2023 Lab Manual for spring 2023DSP Spring 2023 Lab Manual for spring 2023
DSP Spring 2023 Lab Manual for spring 2023
OvaisAkhter4
 
Lab8.classpathLab8.project Lab8 .docx
Lab8.classpathLab8.project  Lab8   .docxLab8.classpathLab8.project  Lab8   .docx
Lab8.classpathLab8.project Lab8 .docx
DIPESH30
 
Lec1_EENG112-Introduction.pdf
Lec1_EENG112-Introduction.pdfLec1_EENG112-Introduction.pdf
Lec1_EENG112-Introduction.pdf
ShwetaSaharan8
 
Resume Electrical
Resume ElectricalResume Electrical
Resume Electrical
Shahid Ali
 
(Company profile)ykt pcb manufacturer_in_korea_2019_1st_half
(Company profile)ykt pcb manufacturer_in_korea_2019_1st_half(Company profile)ykt pcb manufacturer_in_korea_2019_1st_half
(Company profile)ykt pcb manufacturer_in_korea_2019_1st_half
Park Jin Young
 
FlashPAK-III_Operator_Guide
FlashPAK-III_Operator_GuideFlashPAK-III_Operator_Guide
FlashPAK-III_Operator_Guide
Roger A Sharp
 
Embedded System Practical manual (1)
Embedded System Practical manual (1)Embedded System Practical manual (1)
Embedded System Practical manual (1)
Niraj Bharambe
 
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORY
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORYCS6311- PROGRAMMING & DATA STRUCTURE II LABORATORY
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORY
Radha Maruthiyan
 
CV - TRAN DUC SANG
CV - TRAN DUC SANGCV - TRAN DUC SANG
CV - TRAN DUC SANG
Tran Duc Sang
 
c programing
c programingc programing
c programing
bibek lamichhane
 
LMmanual.pdf
LMmanual.pdfLMmanual.pdf
LMmanual.pdf
NarutoUzumaki413489
 
EXPERIMENTAL STUDY AND THERMAL MODEL DEVELOPMENT OF DRY PROCESS
EXPERIMENTAL STUDY AND THERMAL MODEL DEVELOPMENT OF DRY PROCESSEXPERIMENTAL STUDY AND THERMAL MODEL DEVELOPMENT OF DRY PROCESS
EXPERIMENTAL STUDY AND THERMAL MODEL DEVELOPMENT OF DRY PROCESS
IRJET Journal
 
Laptop Desktop Chip level Repairing Course Syllabus.
Laptop Desktop Chip level Repairing Course Syllabus.Laptop Desktop Chip level Repairing Course Syllabus.
Laptop Desktop Chip level Repairing Course Syllabus.
oscillate
 

Similar to Lab5 (pfl) 20_mdele136(ausaf) (20)

Lab2 (pfl) 20_mdele136(ausaf)
Lab2 (pfl) 20_mdele136(ausaf)Lab2 (pfl) 20_mdele136(ausaf)
Lab2 (pfl) 20_mdele136(ausaf)
 
Bti1022 lab sheet 3
Bti1022 lab sheet 3Bti1022 lab sheet 3
Bti1022 lab sheet 3
 
Verilog lab mauual
Verilog lab mauualVerilog lab mauual
Verilog lab mauual
 
Ranhnel R Navarez Resume
Ranhnel R Navarez ResumeRanhnel R Navarez Resume
Ranhnel R Navarez Resume
 
BPOPS203 PRINCIPLES OF PROGRAMMING USING C LAB Manual.pdf
BPOPS203 PRINCIPLES OF PROGRAMMING USING C LAB Manual.pdfBPOPS203 PRINCIPLES OF PROGRAMMING USING C LAB Manual.pdf
BPOPS203 PRINCIPLES OF PROGRAMMING USING C LAB Manual.pdf
 
Lab exe 2 dti 2143
Lab exe 2 dti 2143Lab exe 2 dti 2143
Lab exe 2 dti 2143
 
Lab exe 2 dti 2143 dam31303
Lab exe 2 dti 2143 dam31303Lab exe 2 dti 2143 dam31303
Lab exe 2 dti 2143 dam31303
 
DSP Spring 2023 Lab Manual for spring 2023
DSP Spring 2023 Lab Manual for spring 2023DSP Spring 2023 Lab Manual for spring 2023
DSP Spring 2023 Lab Manual for spring 2023
 
Lab8.classpathLab8.project Lab8 .docx
Lab8.classpathLab8.project  Lab8   .docxLab8.classpathLab8.project  Lab8   .docx
Lab8.classpathLab8.project Lab8 .docx
 
Lec1_EENG112-Introduction.pdf
Lec1_EENG112-Introduction.pdfLec1_EENG112-Introduction.pdf
Lec1_EENG112-Introduction.pdf
 
Resume Electrical
Resume ElectricalResume Electrical
Resume Electrical
 
(Company profile)ykt pcb manufacturer_in_korea_2019_1st_half
(Company profile)ykt pcb manufacturer_in_korea_2019_1st_half(Company profile)ykt pcb manufacturer_in_korea_2019_1st_half
(Company profile)ykt pcb manufacturer_in_korea_2019_1st_half
 
FlashPAK-III_Operator_Guide
FlashPAK-III_Operator_GuideFlashPAK-III_Operator_Guide
FlashPAK-III_Operator_Guide
 
Embedded System Practical manual (1)
Embedded System Practical manual (1)Embedded System Practical manual (1)
Embedded System Practical manual (1)
 
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORY
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORYCS6311- PROGRAMMING & DATA STRUCTURE II LABORATORY
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORY
 
CV - TRAN DUC SANG
CV - TRAN DUC SANGCV - TRAN DUC SANG
CV - TRAN DUC SANG
 
c programing
c programingc programing
c programing
 
LMmanual.pdf
LMmanual.pdfLMmanual.pdf
LMmanual.pdf
 
EXPERIMENTAL STUDY AND THERMAL MODEL DEVELOPMENT OF DRY PROCESS
EXPERIMENTAL STUDY AND THERMAL MODEL DEVELOPMENT OF DRY PROCESSEXPERIMENTAL STUDY AND THERMAL MODEL DEVELOPMENT OF DRY PROCESS
EXPERIMENTAL STUDY AND THERMAL MODEL DEVELOPMENT OF DRY PROCESS
 
Laptop Desktop Chip level Repairing Course Syllabus.
Laptop Desktop Chip level Repairing Course Syllabus.Laptop Desktop Chip level Repairing Course Syllabus.
Laptop Desktop Chip level Repairing Course Syllabus.
 

Recently uploaded

MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Diana Rendina
 

Recently uploaded (20)

MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
 

Lab5 (pfl) 20_mdele136(ausaf)

  • 1. Lab Report # 05 EE-112L - Programming Fundamentals Lab By Ausaf Ahmad Section: A Reg. # 20MDELE136 Class No.: 18 Instructor Engr. Jawad Ali Lecturer Department of Electrical Engineering, University of Engineering and Technology Mardan DATED: 25/04/2021
  • 2. Task 1: Take your name and roll number as inputs and display them 7 times on the screen using for loop. Code: //___PF Lab5___// //___Task 1___// //___20MDELE136___// //___AUSAF AHMAD___// #include <stdio.h> int main() { printf("ntt PF Lab 05 ntt Task 1 ntt 20MDELE136 ntt AUSAF AHMAD ntt*************n"); int a; for (a=1;a<=7;a++) { printf ( "20MDELE136n"); printf ( "Ausaf Ahmadn" ); } return 0; }
  • 4. Task 2: Display the first ten positive integers, using for loop. Code: //___PF Lab5___// //___Task 2___// //___20MDELE136___// //___AUSAF AHMAD___// #include <stdio.h> int main() { printf("ntt PF Lab 05 ntt Task 2 ntt 20MDELE136 ntt AUSAF AHMAD ntt*************nn"); int UETMardan; printf("The first 10 positive integers are:n" ); for(UETMardan=1;UETMardan<=10;UETMardan++) { printf("tt%dn",UETMardan); } printf("n"); }
  • 6. Task 3: Write a program that calculates the factorial of a number. Code: //___PF Lab5___// //___Task 3___// //___20MDELE136___// //___AUSAF AHMAD___// #include <stdio.h> void main(){ printf("ntt PF Lab 05 ntt Task 1 ntt 20MDELE136 ntt AUSAF AHMAD ntt*************nn"); int i,f=1,num; printf("Input the number : "); scanf("%d",&num); for(i=1;i<=num;i++) f=f*i; printf("The Factorial of %d is: %dn",num,f); }
  • 8. Result: Snap-B (Output of program) *****THE END*****