c programing solve presentation -cse

12
Daffodil International University Programming in C PRESENTATION

Upload: salman-ahmed

Post on 17-Aug-2015

139 views

Category:

Engineering


5 download

TRANSCRIPT

Page 1: C Programing Solve Presentation -CSE

Daffodil International University

Programming in CPRESENTATION

Page 2: C Programing Solve Presentation -CSE

CSE LAB

Submitted To----------------------------------

Md. Sazzadur Ahamed Problem Solving Lab TeacherDaffodil International University

Page 3: C Programing Solve Presentation -CSE

Group Name :

We Are1. Salman Ahmed 151-15-5418

2. Noban Hasan 151-15-5035

3. MD Manik 151-15-5039

4. Clinton Plasid 151-15-5077

5. Farhan Saifullah 151-15-4791

Page 4: C Programing Solve Presentation -CSE

PS-K Presentation Topic

Write a code which calculate the value of (a+b)3

Write a code as you wish (should be unique, don’t match with others code).

Page 5: C Programing Solve Presentation -CSE

Write a code which calculate the value of (a+b)3

#include<stdio.h> Standard Input Output Header

int main() { int a,b,c; Variable declare

scanf("%d%d" , &a,&b); input the value of a and b

c = (a+b) * (a+b) *(a+b); Calculate the value of (a+b)^3

printf("%d" ,c); Display the Result in Console

return 0; }

Page 6: C Programing Solve Presentation -CSE

Program Code in Code::blocks

Page 7: C Programing Solve Presentation -CSE

Output Screenshort

Page 8: C Programing Solve Presentation -CSE

Our Own Code (Fibonacci Number)

#include<stdio.h>

int main(){ int i,j; while(1==scanf("%d" ,&j)) Input the sequence of fibonacci { int a=0 ,b =1,c; for(i=1;i<=(j-1);i++) Loop { printf("%d " ,a); print the first element of fibonacci seris c=a+b; a= b; assign the value of b in a variable b= c; assign the value of c in b variable } printf("%d\n",a); Print the last value of a; } return 0;}

Page 9: C Programing Solve Presentation -CSE

Program Code in Code::blocks

Page 10: C Programing Solve Presentation -CSE

Output Screenshort

Fibonacci Number

Page 11: C Programing Solve Presentation -CSE
Page 12: C Programing Solve Presentation -CSE