0% found this document useful (0 votes)
23 views6 pages

C.S.E. Lab Report 1 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views6 pages

C.S.E. Lab Report 1 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

INTRODUCTION:

C is called mother snd structured programming language. In this


lab report , I draw some flowchart and write some code for problem
solving .So,in the process of solving this problem had to use arithmetic
operation such as summation , multiplication etc.

Lab task 1 :- write a C program to display “This is my first program”

CODE :-

#include<stdio.h>

int main ()

printf("This is my first program");

return 0 ;

RESULT:-
Lab Task:-2. Write a C program to display your Id , name ,Dept Name and
University Name followed by a newline.

CODE:-

#include <stdio.h>

int main(){

printf("Student id:240238\n");

printf("Name:Md.Ridoy Hasan Jihad\n");

printf("Department Name:Electrical & Electronic Engineering \n")

printf("University name:Pabna University Of Science & Technology ")

return 0;

RESULT:-
Lab Task :-3. write a c program to add two numbers ( 2 and 6 ) and display
its sum

CODE:-
Start
#include<stdio.h>

int main ()

{ INPUT 2,6

int a,b,sum;

SUM=2+6
a=2;

b=6;
DISPLAY
sum = a+b; SUM
printf("sum=%d",sum);

return 0 ; END

RESULT:-
Lab Task :-4 . Write A C program to multiply two numbers ( 2 and 8 ) and
display its product .

CODE:-

#include<stdio.h>

int main () STAR

{
INPUT 4,5
int a,b, mul;

a=4; MUL=a*b

b=5;

mul = a*b; DISPLAY


printf("mul=%d",mul); MUL

return 0 ; END

RESULT:-
Lab Task :-5. Write a C program to add two numbers (5 and 8) and display its
sum like
(5 + 8 = 13).

CODE:-

#include <stdio.h> STAR

int main() INPUT a

int a,b,sum; INPUT b


printf("Enter the value of a: ");

scanf("%d",&a);
SUM =
printf("Enter the value of b: "); a+b

scanf("%d",&b);
DISPLAY
SUM
sum = a+b;

printf ("sum=%d",sum);
END

return 0;

RESULT :-
DICUSSION :

 Finally I solved lab exercise .Scince I am a new programmer I had to


face some problems .In 3rd no problem, since the value was given 2,6
that’s why scanf cannot be use.In 4 no problems, I didn’t use comma
after the double quote in printf that’s why program didn’t run and
calculate “multiplication” properly.

 The end time, I can say that our programming journey would have
been more difficult if we had not followed sir’s lab manual . Since the
manual had some examples,due to which the mistakes were a little
less .

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy