0% found this document useful (0 votes)
18 views4 pages

Lab 2C

The document outlines a lab session focused on programming using C language, detailing the setup process and software requirements, including CodeBlocks as the IDE. It describes the steps to create, save, compile, and run a C program that identifies the greatest number. Additionally, it explains basic programming concepts such as functions, variables, and conditional statements.

Uploaded by

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

Lab 2C

The document outlines a lab session focused on programming using C language, detailing the setup process and software requirements, including CodeBlocks as the IDE. It describes the steps to create, save, compile, and run a C program that identifies the greatest number. Additionally, it explains basic programming concepts such as functions, variables, and conditional statements.

Uploaded by

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

Lab No: ২ Date: / /2024

Lab Name: িতন�ট সংখ�ার মেধ� বড় সংখ�া wbY©েয়র জন� GKwU wm †cÖvMÖvg|
ZË¡ (Theory):

wm †cÖvMÖv‡g e¨eüZ ‡÷U‡g›U¸‡jv cybive„wË Abyhvqx wbe©‡ni cÖ‡qvRb n‡j wKsev kZ©mv‡c‡ÿ †Kvb †÷U‡g›U m¤úv`‡bi Rb¨ if, if
--- else, else if I switch BZ¨vw` †÷U‡g›U e¨eüZ nq| G¸‡jv‡K KwÛkbvj K‡›Uªvj †÷U‡g›U ejv nq| †÷U‡g›U
wbe©vn wbqš¿‡Yi Rb¨ K‡›Uªvj †÷U‡g›U e¨eüZ nq| K‡›Uªvj †÷U‡g›U e¨envi K‡i †cÖvMÖvg †jLv n‡j †cÖvMÖv‡gi AvKvi †QvU nq Ges
‡cÖvMÖvg wbe©v‡ni mgq Kg jv‡M| K‡›Uªvj †÷U‡g›U e¨eüZ kZ© mZ¨ n‡j †cÖvMÖv‡g GK ai‡bi dj cvIqv hvq, Avi kZ© mZ¨ bv n‡j
†cÖvMÖv‡g Ab¨ ai‡bi dj cvIqv hvq|

cÖ‡qvRbxq nvW©Iq¨vi: GKwU Kw¤úDUvi (Computer)

cÖ‡qvRbxq mdUIq¨vi:

1. Acv‡iwUs wm‡÷g (Operating System) – DB‡ÛvR (Windows)


2. †U·U GwWUi (Text Editor/IDE) – ‡KvWeK¬m (CodeBlocks)

e¨eüZ †cÖvMÖvwgs fvlv ( Programing Language): wm †cÖvMÖvwgs (C Programing )

hš¿cvwZi e¨envi (Uses of Device):

1. cÖ_‡g Kw¤úDUv‡i we`y¨r ms‡hvM †`B


2. UPS Ab Kwi (hw` _v‡K)
3. Monitor Ges CPU Gi Power Button G ‡cÖm (Press) K‡i Kw¤úDUvi Ab Kwi
4. cÖ‡qvRbxq mKj ai‡bi Software Install Av‡Q wK bv †`‡L †bB, bv _vK‡j Install Kwi|

cÖwµqv AbymiY (Process):

1. cÖ_‡g Start > CodeBlocks > CodeBlocks wb‡`©k w`‡q CodeBlocks Open Kwi| CodeBlocks
Open n‡j File > New > Empty File wb‡`©k w`‡q A_ev Ctrl + N, ‡cÖm (Press) K‡i GKwU File ‰Zwi Kwi|
2. File > Save A_ev Ctrl + S, ‡cÖm (Press) K‡i C Program File wU
greatest_number.c bvg w`‡q Desktop G Save Kwi| wb‡Pi wbq‡g C Program ‰Zwi Kivi Rb¨ cÖ‡qvRbxq †KvW UvBc
Kwi|
greatest_number.c

e¨vL¨v (Description):
ফাংশন/ে�টেম� KvR/e¨vL¨v

/*------*/ WKz‡g‡›Ukb †mKkb| †cÖvMÖv‡gi wewfbœ welq eY©bv Kivi Rb¨|

#include ‡nWvi dvB‡ji mv‡_ wjsK ¯’vcb Kivi Rb¨|

<stdio.h> ÷¨vÛvW© BbcyU/AvDUcyU dvskb e¨envi Kivi Rb¨|


main() cÖwZwU †cÖvMÖv‡gi Avek¨Kxq dvskb|

{ } †cÖvMÖv‡gi wbe©vn‡hvM¨ Ask| cÖwZwU dvsk‡bi ïiæ I ‡kl †evSv‡Z|

int Bw›URvi †WUv †NvlYv Kivi Rb¨|

& (Variable Memory Addres)

printf() †Kv‡bv wKQz cÖ`k©b Kivi Rb¨|


scanf() Kx-‡ev‡W©i gva¨‡g †WUv BbcyU †bIqvi Rb¨|

if if হল িডিসশন েমিকং ে�টেম�।েসিট সতয্ হেল আমরা িকছু ে�টেম� এি�িকউট করব আর না
হেল অনয্ িকছু ে�টেম� এি�িকউট করব।
if else else হল িডিসশন েমিকং ে�টেম�।kZ©vax‡b weKí wbe©vP‡bi Rb¨|

&& (লিজকয্াল AND) অপােরটর িনেদর্শ কের েয উভয় অপাের� সতয্ িকনা।

Compile:
Build > Build wb‡`©k w`‡q A_ev Ctrl + F9, ‡cÖm (Press) K‡i ‡cÖvMÖvg Compile Kwi| ‡cÖvMÖv‡g †Kvb fzj _vK‡j ms‡kvab K‡i Save
Kwi, bv _vK‡j ‡cÖvMÖvg Run Kwi|

Run Ges djvdj:


Build > Run wb‡`©k w`‡q A_ev Ctrl + F10, ‡cÖm (Press) K‡i ‡cÖvMÖvg Run Kwi| cÖ‡qvRbxq †WUv BbcyU w`‡q Enter ‡cÖm (Press)
Kwi| Zvn‡j wb‡Pi djvdj cvIqv hv‡e

You might also like