SlideShare a Scribd company logo
1 of 13
“
”
CSE 115L PROJECT
C PROGRAMMING (FACTORIZATION)
TEAM NAME : NSU DREAMER BOYS
DONE BY :
SABBIR AHMED 1520436042
MD: NASHIRULLAH 1520466642
MD: MOHIN UDDIN 1521690042
“
”
FACTORIALS
SAY THERE’S A NUMBER ’N’.
FACTORIAL OF N WOULD BE:
N! = N(N-1)!
SO IF N=6,
6! = 6 X 5 X 4 X 3 X 2 X 1 = 720
THE PROGRAM WE MADE CAN SHOW FACTORIALS OF
INTEGERS FROM 0 TO 9.
CREATING THE PROGRAM
STEP 1: CREATE A SUB-FUNCTION. THIS FUNCTION IS NAMED
“FACT_CALC”. FOR EACH NUMBER, ASSIGN A PARTICULAR
STRING.
STEP 2: USING THE MAIN FUNCTION, TAKE INPUT. CREATE
LOOPS AND CONDITIONS FOR THE ASTERISK SETS. SET THE
PRINT OUTPUTS ACCORDINGLY FOR INPUT ‘0’, ‘-1’ OR ANY
INVALID INPUTS.
STEP 3: CALL THE SUB-FUNCTION BY SANDWICHING IT
BETWEEN THE TWO ASTERISKS SETS IN THE MAIN FUNCTION,
STEP 1
After declaring function prototype, start writing
up this sub function “fact_calc”.
Declare a string (in this case, ‘fact’) and assign a
suitable length.
Using “if” function, set the output to rely on the
type of input.
Print the string function.
“
”
STEP 2
WRITE UP THE MAIN FUNCTION. DECLARE THE INTEGERS TO BE USED (FOR INPUT,
COUNTER AND CALCULATION)
WRITE UP THE CODE TO TAKE INPUT FROM THE USER, MENTIONING THE PARAMETERS
AS WELL:
RESULT:
USING “IF”, SET THE CONDITIONS FOR THE LINE OF ASTERISKS:
SET OUT THE PRINT COMMANDS IN EACH CONDITION FOR THE
FIRST LINE OF ASTERISKS, THE LENGTH OF WHICH DEPENDS ON
HOW LONG THE CHAIN OF FACTORIAL IS. EG - IF N=5, THEN IT’D
LOOK SOMETHING LIKE THIS:
REPEAT THE EXACT SAME CODE FOR THE SECOND.
SET OUT THE REMAINING CONDITIONS FOR SPECIAL
INPUTS LIKE ‘0’ OR ‘-1’ AND ANY INVALID INPUTS:
STEP 3
CALL THE SUB-FUNCTION “FACT_CALC” BY SANDWICHING IT BETWEEN THE CODE
FOR THE 2 LINES OF ASTERISKS.
AND VOILA! THE CODE IS COMPLETE! LET’S CHECK SOME OF THE
RESULTS!
Hope you enjoyed
our presentation.
Thank you for
watching!
THE END

More Related Content

Similar to CSE 115 l project

College for women department of information science
College for women  department of information science  College for women  department of information science
College for women department of information science AMMY30
 
Kpsi User Guide Model 500
Kpsi User Guide Model 500Kpsi User Guide Model 500
Kpsi User Guide Model 500TAMUK
 
Answers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
Answers To Selected Exercises For Fortran 90 95 For Scientists And EngineersAnswers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
Answers To Selected Exercises For Fortran 90 95 For Scientists And EngineersSheila Sinclair
 
Procedure to create_the_calculator_application java
Procedure to create_the_calculator_application javaProcedure to create_the_calculator_application java
Procedure to create_the_calculator_application javagthe
 
Cis 170 c ilab 5 of 7 arrays and strings
Cis 170 c ilab 5 of 7 arrays and stringsCis 170 c ilab 5 of 7 arrays and strings
Cis 170 c ilab 5 of 7 arrays and stringsCIS321
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsnoahjamessss
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringscskvsmi44
 
For this phase of the course project, you will research a bank to .docx
For this phase of the course project, you will research a bank to .docxFor this phase of the course project, you will research a bank to .docx
For this phase of the course project, you will research a bank to .docxhanneloremccaffery
 
Devry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and stringsDevry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and stringsjody zoll
 
C programming assignment presentation file
C programming assignment presentation fileC programming assignment presentation file
C programming assignment presentation filesantoshkumarhpu
 
Macros for Shape and formula
Macros for Shape and formulaMacros for Shape and formula
Macros for Shape and formulaPramodkumar Jha
 
Cs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUALCs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUALPrabhu D
 
C and Data structure lab manual ECE (2).pdf
C and Data structure lab manual ECE (2).pdfC and Data structure lab manual ECE (2).pdf
C and Data structure lab manual ECE (2).pdfjanakim15
 

Similar to CSE 115 l project (20)

College for women department of information science
College for women  department of information science  College for women  department of information science
College for women department of information science
 
Kpsi User Guide Model 500
Kpsi User Guide Model 500Kpsi User Guide Model 500
Kpsi User Guide Model 500
 
Muzzammilrashid
MuzzammilrashidMuzzammilrashid
Muzzammilrashid
 
Answers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
Answers To Selected Exercises For Fortran 90 95 For Scientists And EngineersAnswers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
Answers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
 
Procedure to create_the_calculator_application java
Procedure to create_the_calculator_application javaProcedure to create_the_calculator_application java
Procedure to create_the_calculator_application java
 
Cis 170 c ilab 5 of 7 arrays and strings
Cis 170 c ilab 5 of 7 arrays and stringsCis 170 c ilab 5 of 7 arrays and strings
Cis 170 c ilab 5 of 7 arrays and strings
 
Matlab file
Matlab fileMatlab file
Matlab file
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
 
For this phase of the course project, you will research a bank to .docx
For this phase of the course project, you will research a bank to .docxFor this phase of the course project, you will research a bank to .docx
For this phase of the course project, you will research a bank to .docx
 
Java lab 2
Java lab 2Java lab 2
Java lab 2
 
Devry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and stringsDevry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and strings
 
Sasin nisar
Sasin nisarSasin nisar
Sasin nisar
 
C programming assignment presentation file
C programming assignment presentation fileC programming assignment presentation file
C programming assignment presentation file
 
JavaProgrammingManual
JavaProgrammingManualJavaProgrammingManual
JavaProgrammingManual
 
Macros for Shape and formula
Macros for Shape and formulaMacros for Shape and formula
Macros for Shape and formula
 
Java Lab Manual
Java Lab ManualJava Lab Manual
Java Lab Manual
 
Cs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUALCs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUAL
 
Conditional structure
Conditional structureConditional structure
Conditional structure
 
C and Data structure lab manual ECE (2).pdf
C and Data structure lab manual ECE (2).pdfC and Data structure lab manual ECE (2).pdf
C and Data structure lab manual ECE (2).pdf
 

More from Mohin Ibn Mohammad (20)

Life in Dhaka city Presentation Slide
Life in Dhaka city Presentation SlideLife in Dhaka city Presentation Slide
Life in Dhaka city Presentation Slide
 
Life in Dhaka city report
Life in Dhaka city reportLife in Dhaka city report
Life in Dhaka city report
 
Reading comprehension guideline
Reading comprehension guidelineReading comprehension guideline
Reading comprehension guideline
 
Microeconomics assignment presentation slide
Microeconomics assignment presentation slideMicroeconomics assignment presentation slide
Microeconomics assignment presentation slide
 
Microeconomics assignment Report
Microeconomics assignment ReportMicroeconomics assignment Report
Microeconomics assignment Report
 
Online banking & finance in Bangladesh
Online banking & finance in BangladeshOnline banking & finance in Bangladesh
Online banking & finance in Bangladesh
 
Application for illness, 26th July 2016
Application for illness, 26th July 2016Application for illness, 26th July 2016
Application for illness, 26th July 2016
 
Md. Mohin Uddin
Md. Mohin UddinMd. Mohin Uddin
Md. Mohin Uddin
 
Essential of computer hardware & software
Essential of computer hardware & softwareEssential of computer hardware & software
Essential of computer hardware & software
 
My invitations
My invitationsMy invitations
My invitations
 
My invitation(2)
My invitation(2)My invitation(2)
My invitation(2)
 
Heraldic party-invitation
Heraldic party-invitationHeraldic party-invitation
Heraldic party-invitation
 
My dream job
My dream jobMy dream job
My dream job
 
Influence of white color in Bangladesh
Influence of white color in BangladeshInfluence of white color in Bangladesh
Influence of white color in Bangladesh
 
Hostel life
Hostel lifeHostel life
Hostel life
 
Eng assignment
Eng assignmentEng assignment
Eng assignment
 
Birth day invitation card
Birth day invitation cardBirth day invitation card
Birth day invitation card
 
About myself
About myselfAbout myself
About myself
 
Assignment on racism
Assignment on racismAssignment on racism
Assignment on racism
 
Accounting cover page
Accounting cover pageAccounting cover page
Accounting cover page
 

Recently uploaded

Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 

Recently uploaded (20)

Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 

CSE 115 l project

  • 1. “ ” CSE 115L PROJECT C PROGRAMMING (FACTORIZATION) TEAM NAME : NSU DREAMER BOYS DONE BY : SABBIR AHMED 1520436042 MD: NASHIRULLAH 1520466642 MD: MOHIN UDDIN 1521690042
  • 2. “ ” FACTORIALS SAY THERE’S A NUMBER ’N’. FACTORIAL OF N WOULD BE: N! = N(N-1)! SO IF N=6, 6! = 6 X 5 X 4 X 3 X 2 X 1 = 720 THE PROGRAM WE MADE CAN SHOW FACTORIALS OF INTEGERS FROM 0 TO 9.
  • 3. CREATING THE PROGRAM STEP 1: CREATE A SUB-FUNCTION. THIS FUNCTION IS NAMED “FACT_CALC”. FOR EACH NUMBER, ASSIGN A PARTICULAR STRING. STEP 2: USING THE MAIN FUNCTION, TAKE INPUT. CREATE LOOPS AND CONDITIONS FOR THE ASTERISK SETS. SET THE PRINT OUTPUTS ACCORDINGLY FOR INPUT ‘0’, ‘-1’ OR ANY INVALID INPUTS. STEP 3: CALL THE SUB-FUNCTION BY SANDWICHING IT BETWEEN THE TWO ASTERISKS SETS IN THE MAIN FUNCTION,
  • 5. After declaring function prototype, start writing up this sub function “fact_calc”. Declare a string (in this case, ‘fact’) and assign a suitable length. Using “if” function, set the output to rely on the type of input. Print the string function.
  • 6. “ ” STEP 2 WRITE UP THE MAIN FUNCTION. DECLARE THE INTEGERS TO BE USED (FOR INPUT, COUNTER AND CALCULATION) WRITE UP THE CODE TO TAKE INPUT FROM THE USER, MENTIONING THE PARAMETERS AS WELL: RESULT:
  • 7. USING “IF”, SET THE CONDITIONS FOR THE LINE OF ASTERISKS:
  • 8. SET OUT THE PRINT COMMANDS IN EACH CONDITION FOR THE FIRST LINE OF ASTERISKS, THE LENGTH OF WHICH DEPENDS ON HOW LONG THE CHAIN OF FACTORIAL IS. EG - IF N=5, THEN IT’D LOOK SOMETHING LIKE THIS: REPEAT THE EXACT SAME CODE FOR THE SECOND.
  • 9. SET OUT THE REMAINING CONDITIONS FOR SPECIAL INPUTS LIKE ‘0’ OR ‘-1’ AND ANY INVALID INPUTS:
  • 10. STEP 3 CALL THE SUB-FUNCTION “FACT_CALC” BY SANDWICHING IT BETWEEN THE CODE FOR THE 2 LINES OF ASTERISKS.
  • 11. AND VOILA! THE CODE IS COMPLETE! LET’S CHECK SOME OF THE RESULTS!
  • 12. Hope you enjoyed our presentation. Thank you for watching!