SlideShare a Scribd company logo
“
”
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 500
TAMUK
 
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
Sheila 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-strings
noahjamessss
 
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
cskvsmi44
 
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
hanneloremccaffery
 
Java lab 2
Java lab 2Java 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
jody zoll
 
Sasin nisar
Sasin nisarSasin nisar
Sasin nisar
SasinNisar
 
C programming assignment presentation file
C programming assignment presentation fileC programming assignment presentation file
C programming assignment presentation file
santoshkumarhpu
 
Macros for Shape and formula
Macros for Shape and formulaMacros for Shape and formula
Macros for Shape and formula
Pramodkumar Jha
 
Java Lab Manual
Java Lab ManualJava Lab Manual
Java Lab Manual
Naveen Sagayaselvaraj
 
Cs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUALCs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUALPrabhu D
 
Conditional structure
Conditional structureConditional structure
Conditional structure
International Islamic University
 
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
janakim15
 

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

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

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

Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 

Recently uploaded (20)

Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 

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!