0% found this document useful (0 votes)
22 views

Coding - Assignment 1

C programming notes

Uploaded by

Monika B
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)
22 views

Coding - Assignment 1

C programming notes

Uploaded by

Monika B
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/ 8

Asianmert -

StMPLE CALCULATOR Suoitch case

TneludeStdie.h>
intmain
idta, b;
Char ym
humbern Ete 1ho 2dumber"
frintt C" Enler 1he 1t
Prodf(Enter the Symbol")
Scourf (1-d,&o, b ) ;
SCanf ( / sym)
Suitch (Sym)
Caze+'
valua is d,atb)
Privdtf (he
break;
Coe-
Printf C"The vabe u 7d, a-b)
reak
Case
PrindfCh Velua iu /d", atb);
b meak
Coxe
Pridf (Te Valwr
1d, a/b).
break

Mehum 0,
LeorYa er Mot
ine wde 3
int main (
int yean
Privt fCilen oyo: "),
3cott( yan)
f(Cyar/400 ==o) 11 (year|-A-=o)2(yat-10-1

Piotf ( op ypa 1/ ya)

ek 1
Printf d i et a lkop yeu yan

retun 0
even er
Odo
Ven numbe is
clude shlip.h>
ut mam

Prit f C" Eto t numben


Sccurt ( d, un);
f (n:/2 ==o)
Pindt iven humben in eMen")

Prikf( he oAnen
umber is odel"
DivisilG by 2 and 4

hweludstdbo
main (
Piutf CEile te umbo")
Sawf (.d,'cn)
Cn--o) a& (nhAso)
iatft ovidu by bult aaud)
ose

d')
Oefunno
Mooxi wum ulber amoug 3 iveaes

includeSHiL
int maiu )
int a, b, c;
Priudf CEtin a val h Eck bvalue n Evta
Cval)
ntCas att

ebif (a)a4 (b>e)s


Pindf(hh omeatat)

elel(a--b)AR ( b==c):
Printf IUmloer4 ae nal

PrintfCi qeat
yetusn O
7 Wek days
6 Melude Shlao h>
wt nain (
Td doy
Sofed (doy)
PivdSuandoy)
break
CaX
PdModoy")
veok
Coe3
Pid f CTuesday")
CNA
Pitf(valaduday)
break,
CRse
PudfC "Tancday")
preak
Cox b
Pdf CFriolay ")
break
CaeT J
(Satundou"
vetun O
GTiven tUmber posrfi ve, Mgatie n0

wclude Stlio >

int n
Prindf Ent 1e humbo)
soanf(d, n)
Priot(T qinen umben U poive "

obo Cn==o)
Prit fC Th vlen numben s 20D

Pid FCTu 2Mhen hlunetr u a hi


iw .

Yetsn 0
0 MUmmoeh On0.Mg gey
MiwmlW
tinclude Sli.k
int main
uab C)
iatf(" Ete value Evit bvau h Eit
SOnfd,ka, eb,&c) valu)
(b) Bk (a< c)}
Porivnta uitl
mirimum

obsl (t<a) k2 (bz o)

olsa (o-b)A 2Ch= =c))


Printt oll rmher aral)

ee
Pidf(c minimum "

Metumn O0

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