Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
14 views
C Assignment
Uploaded by
udaykiran.adama
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save C assignment For Later
Download
Save
Save C assignment For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
14 views
C Assignment
Uploaded by
udaykiran.adama
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save C assignment For Later
Carousel Previous
Carousel Next
Save
Save C assignment For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 14
Search
Fullscreen
101123, 4:54 PM Module 1 Exercises -Colaboratory + Module 1 Exercises Double-click (or ents) to eat + Develop a calculator to convert from one unit o another atime 2.Distance 3. Temperatuere prancé("Enter the runner of seconds: "Ds Seant°¥a", seconds); hours = (dubte) seconds / 3600 prsnee(s seconds 45 equal to HF hours\n", seconds, hours) 7200 seconds is equal to 2.680688 hours se san9-690 int main() pears Kian ries ~ kon prinef CXF kitoneters Ss equal to Xf ailes\n", kiloneters, ales); overwriting san. 7a.out fine rain) prinee(veetesus: ")3 SeareMF, Beclesus) (CMF coleturs ts equal to Hf kelvin\n", celetus, Kelvin)s hntps:lleolab research google.convrive1DcF q StUaRFZESKTYATLOGSXKadKtA2sprntMode=true a1011723, 4:54 Pa Module 1 Exercises -Colaboratory overwriting san. celeiuss 38 35000000 celciurs 1s equal to 389.24399¢ kelvin + Simple interest int rain) cipal, rate, princé("Enten principal aunt (9): "Ds Feant CX, Aprinetpal)s print#(‘Enter rate of interest (8): ")i Seare(rx, arate); prante(“Enter tine period in years (1): “ds Scart("xe", tine): sinple_interest = (principal * rate * tine) / 200; printe("Sinple Interest: Xf\a", simple interest); lvenunst ine sanp.cop ace Son -cpP Vacout Enter prinetpal amount (P): 10080 Enter rate of anterest (RD! 7 Enter tine period in years (1): 2 + Calculate the total marks, average and percentage ofthe 5 subjects, sre maint) ish, Nathenatics, Prysics, Chenistry, Programming: prince ("Enten marks for English scart", AEnglish) prines(-Enten marks for Mathenaties: Sears("Aa", satnenaties); printé("Enten marks for Physics: Scant%a", APhysies); prinee("Enten mares for Chensstry: ")s Scare, achensstey); prante(-Enten mares for Programing Seart("%a", aprogranning): matics + Physics + Chantstry + Programing: average = total 5.23 hntps:lleolab research google.convrive1DcF q StUaRFZESKTYATLOGSXKadKtA2sprntMode=true ana1011723, 4:54 Pa Module 1 Exercises -Colaboratory percentage = (total /(S.8 * 100)) * 3085 prinee(cTotat Marks: 44\n", total); pranee(caverage Marks: FW", average); print#( Percentage: 2¢\0 Enter marks for cnenistry: 87 Enter marks for, roptannan® 98 average Mares: 98.800003 + Calculate the net salary ofan employee given basic, daha, pf and others. neladecstiorh> ne rain) prince(“enter sasic Salary (S) Sean basic); princecenter Ha (8): “D3 eaneX thea); printe(“enter TA (8): °) Sean" ata); printe(*enter others (8): "): Sean" botners); f= (boste+22)/200; Jesleutate PF 16% of baste salary p= (baster24)/200; Jfealeulate 11, 19% of baste salary toasters} 206; rotisalary = Basie 4 da ¢ hea ¥ ta ¥ others = (fest); Liprincing Net sa prsnee Cnet SS! $ KeDAO" nets ays Enter Ha (= 1000 Enter TA (S)? 2500 Enter others (8)" 5008 ‘+ Retrieve remainder after dvision of two numbers without using mod operator. hitps:lleolab research google.convrive1cFq StUaRFZESKTYATLOGSXKadKtA2sprintMode=true ana1011723, 4:54 Pa Module 1 Exercises -Colaboratory soinsé("Enten the obvidens: “5 prines("Entan the aivisor: “)s seant(MG", Advisor) 1) Calculate the remainder insle (rensinder >» etvisor) > prsnes( Remainder: 2e\n", renasnder) + Convert an upper-case character to a lower-case character, Sint main() enor upper case thar, lowercase char prént#("Enter an uppercase character: °)s Scart(” He", Rupper_case_char); ry 46 (upper cae 11 Convert Lowercase by adding 32 to the AS Ae\n", Lower case. Chae): > prine(“input 45 not an uppercase character.\n")s overting san. + Swap two numbers int maint) pranté("Entar the value of x: “)i hitps:lleolab research google.convrive1cFq StUaRFZESKTYATLOGSXKadKtA2sprintMode=true ana1011723, 4:54 Pa scant Re, ods printf ("Enter the value of 5 “2s Seare(Ma", &) princf(cArcen sanpping:\n")s printf'x = K8\n"s 9) printeCy = Xa\8", 9) verentt ang sanp.cop ce song cpp Va.out Enter she value of yi 38 + Enter wo angles ofa triangle and find the third angle int main() ‘oat anglen, angle2, angie rant e-em Scart°R¢", banglel): yt angle: *); printé(‘Enter the measure of the second angle: “s cant Xr", dangle?) Enter the maasure of the first angle: 42 The measure of the third angle 1s; 69,609000 degrees ‘+ Check Least Significant it (LSB) of a number princf("Enten any members °)3 Feanf(%a", non); (Jf (oun & 3) evaluates t0.2*7 Se(run 8) PrInt(PUSB Of Me Ge set (2).", nu); Printt("USB of Ra Ss unset (@)-"5 num); Module 1 Exercises -Colaboratory + angles): hntps:lleolab research google.convrive1DcF q StUaRFZESKTYATLOGSXKadKtA2sprntMode=true sna1011723, 4:54 Pa Module 1 Exercises -Colaboratory Se or a8 is set (2) ‘Check whether the angles equilateral, 'soscetes, or scalene triangle. int main() the Lengths of three sides of a triangle:\n"); Scant ("Ma 4 Re", ASiaed, Msiée2, 453003); 46 (sider = stoe2 ah side? =» sta03) print" is an equilateral trésngle.\n"); > else 1 (siden == seed || sigez = stdea || sidet => sides) printe(*re 45 an Ssosceles trsangle.\n")s printe("tt ts a scalene tetangle.\9")5 + Check whether entered years a leap year or not safle samp.c90 sincluce ceteto.h> ine main() prsnes(enten a years“) 16 ((year % 4 20 @ 48 year % 160 I= 0) || (year X 480 = 8) Print (Kd ts 3 leap year-\n", yoar)s ? peint('Ad 15 not a Leap year.\n"s year): hntps:lleolab research google.convrive1DcF q StUaRFZESKTYATLOGSXKadKtA2sprntMode=true ena1011723, 4:54 Pa Module 1 Exercises -Colaboratory Enter 2 year 975 48 hot a + Find minimum among tree numbers Double-click (or enter) to eat prine("Enten three Mnben\n"); see) ‘ (ace) print#("Saaldest Number Ss: R4",sn031); ce an cop + Check whether a numbers chisible by Sand 11 or not pranse(venter an inte Scont(Ha", dnenber}; 4 (ounber X 5 <= @ BB nunber X 11 == @) print("Ad Ls divisible by bath 5 and 21.0", mumber): , Print(Xd £5 not divisible by both § and 31.\n", manber)s hitps:lleolab research google.convrive1cFq StUaRFZESKTYATLOGSXKadKtA2sprintMode=true 741011723, 4:54 Pa Module 1 Exercises -Colaboratory verrdting samp + Design a calculator that performs arithmetic operations on two numbers using switch case print ("tn eant (Ma, Ano » ssten (namer > 0) { print("The number is positive.\n")s switch (number 8) prinee(the number $5 negative. \e")s overwting san. yacout + Find factorial of a number printf("Enten 2 nunber to find factoria scant" in): For ences prinst(*Factonsal of #4 Sst K6",9,f00%)s hitps:lleolab research google.convrive1cFq StUaRFZESKTYATLOGSXKadKtA2sprintMode=true ana1011723, 4:54 Pa overrtting samp ‘+ Check whether numbers @ palindrome or not prancé(enter the nino cant (Xs vinste(way sun=(Sun0) 605 ettengeesun) prinee(-palindrare runber *)3 prinee(°net paltadrone”)s + Check whether numbers perfecto: not sng wain() printe("Enten any runter te check perfect unter: Seore("4e", Bun forth = a5 4 = nun / 25 249) s4¢nunsi == 6) ‘ > s¢toun = nue AB mun > 0) print('Kd 15 PERFECT NABER", nun); Print(Kd Le HOF PERFECT MAMMER", nu); Module 1 Exercises -Colaboratory hntps:lleolab research google.convrive1DcF q StUaRFZESKTYATLOGSXKadKtA2sprntMode=true ona1011723, 4:54 Pa venwntt ing samp. cop + Convert a decimal number to binary number prereé(center 9 decsnal morgen? "); Feant ("Ma Asecina]_nun) sntte (decinal_nur = @) bo; . prinee("Binary nurbers Xan", Binary_nun); Jacout + Print folowing patterns int main() orinté("Enter the number of cous: “): Scant °%0", Brows): for (unt $= ‘ prince yeu se rant" ce sanp.cpP Vacout Module 1 Exercises -Colaboratory 2, rensinders hntps:lleolab research google.convrive1DcF q StUaRFZESKTYATLOGSXKadKtA2sprntMode=true ron1011723, 4:54 Pa Module 1 Exercises -Colaboratory int main(), printe(-Enten the number of 2656s: "); reant%a", an), for (int $a; bee ns So) for (unt $= printeCke *, current. chars printe(e", current. char), printers overwriting sanp.cop Enter the number of Lines! 12 printf ("Enter the number of ous: “3s Scant MA", an) for (unt 5 t prinee("xd "5 munber)s ? Printer) hntps:lleolab research google.convrive1DcF q StUaRFZESKTYATLOGSXKadKtA2sprntMode=true nna1011723, 4:54 Pa Module 1 Exercises -Colaboratory -* Calculate the greatest common divisor of two numbers fine ot, 92, 4, Beds printf ("Enter to Srtegers Seared as", Set, Bea); For (iat; £ ce mt kL ce m2; 48) (nitie=o 8 nzklon0) ) print#("6.C.0 of Rd and KE 1s 84", ny 2, ee8)s Cvenentt ang sanp.cop ce Sanp cpp + Generate frst n numbers inthe Fibonace! series int main() prineé("Enten the runner of terns: ")s Scant (Ma, ns print#("Flbanaced Sertes: Wd, Bd, © for (15 3; Lees HH) printed, ", next Term) yacout hitps:lleolab research google.convrive1cFq StUaRFZESKTYATLOGSXKadKtA2sprintMode=true vane1011723, 4:54 Pa Module 1 Exercises -Colaboratory + Swap two numbers using pointers ine main(), pranes("Enten the value of x and yin") Seane(rdee", 8x, 69) rine ("Before Swapptng\nx = KB\ay = 94\n", x, yBi ant CAFR Suappng\nK = Kd\ny = HE\N, Xs DE + Performs all the five arithmetie operations using Pointers arinté(enter the operator synbol:"}: cant” Ae, lop); ssten (on) Print ("adéition = a, #2 + *p2)s print(*aubetraction =", tpt = *92); print(waltiply = 4", tet * *p2); F(a I= 9) ‘ print (‘division = Ma", ¢pt / #92); ‘ printe(“étviston by zero 1s not allowed”); hntps:lleolab research google.convrive1DcF q StUaRFZESKTYATLOGSXKadKtA2sprntMode=true ran1011723, 4:54 Pa case 'X':printf(Srenainder = Xd", tpt *p2)5 hntps:ilolab research google. conicrive DoF 9 StUaRFZ6SKTVATLOGSXkadKiA2sprniMode=true Module 1 Exercises - Colaborstory sana
You might also like
AKU PPS Pyq 2019
PDF
No ratings yet
AKU PPS Pyq 2019
11 pages
MCS-011 Problem Solving and Programming
PDF
No ratings yet
MCS-011 Problem Solving and Programming
13 pages
FBM-111 Pratical
PDF
No ratings yet
FBM-111 Pratical
77 pages
Pps Upto 39 PDF
PDF
No ratings yet
Pps Upto 39 PDF
39 pages
Dec 13, Doc 1
PDF
No ratings yet
Dec 13, Doc 1
28 pages
fpl set A
PDF
No ratings yet
fpl set A
13 pages
c programming
PDF
No ratings yet
c programming
26 pages
10 To 40 (C S Practicals)
PDF
No ratings yet
10 To 40 (C S Practicals)
20 pages
C Programs
PDF
No ratings yet
C Programs
9 pages
DocScanner Jul 10, 2024 8-27 AM
PDF
No ratings yet
DocScanner Jul 10, 2024 8-27 AM
11 pages
Jasmine Practical File IP
PDF
No ratings yet
Jasmine Practical File IP
91 pages
CP Lesson1-2 Excerise and Tasks
PDF
No ratings yet
CP Lesson1-2 Excerise and Tasks
4 pages
Python Lab Notes
PDF
No ratings yet
Python Lab Notes
26 pages
Adobe Scan Nov 29, 2024
PDF
No ratings yet
Adobe Scan Nov 29, 2024
23 pages
Lab 2
PDF
No ratings yet
Lab 2
21 pages
St Joseph ICT practical
PDF
No ratings yet
St Joseph ICT practical
51 pages
Pps Lab File
PDF
No ratings yet
Pps Lab File
32 pages
Programming and Problem Solving - Laboratory Work - FE - SPPU - 2019 - Copy 1
PDF
No ratings yet
Programming and Problem Solving - Laboratory Work - FE - SPPU - 2019 - Copy 1
28 pages
code2pdf_675c5a2b08f34
PDF
No ratings yet
code2pdf_675c5a2b08f34
3 pages
hello help
PDF
No ratings yet
hello help
7 pages
Programs For Practical File
PDF
No ratings yet
Programs For Practical File
12 pages
Maths worksheet 2
PDF
No ratings yet
Maths worksheet 2
19 pages
PPS UNIT-2; NOTES
PDF
No ratings yet
PPS UNIT-2; NOTES
32 pages
Square Root Factorial Exponential: o o o This Code Has Been Tested On Code Blocks C++ Compiler
PDF
No ratings yet
Square Root Factorial Exponential: o o o This Code Has Been Tested On Code Blocks C++ Compiler
4 pages
2
PDF
No ratings yet
2
10 pages
Notesof C Language by Abhay Kumar Awasthi Till Recursion
PDF
No ratings yet
Notesof C Language by Abhay Kumar Awasthi Till Recursion
27 pages
Practical C
PDF
No ratings yet
Practical C
28 pages
Computer Science (record)
PDF
No ratings yet
Computer Science (record)
22 pages
C++ LAB RECORD
PDF
No ratings yet
C++ LAB RECORD
81 pages
The Choice
PDF
No ratings yet
The Choice
58 pages
C++ Group Assignment
PDF
No ratings yet
C++ Group Assignment
8 pages
C++ Solutions
PDF
100% (1)
C++ Solutions
18 pages
61ccb9eb-c9c9-4cf7-8a80-b8e36c4ba572
PDF
No ratings yet
61ccb9eb-c9c9-4cf7-8a80-b8e36c4ba572
107 pages
Functions
PDF
No ratings yet
Functions
11 pages
PSTC Unit-4
PDF
No ratings yet
PSTC Unit-4
9 pages
Lab 3
PDF
No ratings yet
Lab 3
7 pages
DM PRC
PDF
No ratings yet
DM PRC
9 pages
c++ unit 2
PDF
No ratings yet
c++ unit 2
46 pages
python notes
PDF
No ratings yet
python notes
25 pages
Math Microproject Final Report 3
PDF
No ratings yet
Math Microproject Final Report 3
21 pages
Problems (Lab2)
PDF
No ratings yet
Problems (Lab2)
5 pages
Computer SC Project Format-Xi
PDF
No ratings yet
Computer SC Project Format-Xi
27 pages
Tedious Calculator: Due Monday September 19 by 11:59 PM 80 Points
PDF
No ratings yet
Tedious Calculator: Due Monday September 19 by 11:59 PM 80 Points
3 pages
Compiler Project (112,036,237)
PDF
No ratings yet
Compiler Project (112,036,237)
22 pages
CSE 103 Lab-2
PDF
No ratings yet
CSE 103 Lab-2
4 pages
Am 4 Prac
PDF
No ratings yet
Am 4 Prac
23 pages
BCSL 032
PDF
No ratings yet
BCSL 032
16 pages
Lab 1
PDF
No ratings yet
Lab 1
4 pages
Week 2-6
PDF
No ratings yet
Week 2-6
44 pages
Data Handling
PDF
No ratings yet
Data Handling
13 pages
Temperate
PDF
No ratings yet
Temperate
18 pages
Computer - Practical 2021
PDF
No ratings yet
Computer - Practical 2021
16 pages
Cs Notes
PDF
No ratings yet
Cs Notes
28 pages
Pds Lab Practice Questions
PDF
No ratings yet
Pds Lab Practice Questions
10 pages
taufikpy
PDF
No ratings yet
taufikpy
24 pages
This Lab Exercise Covers: An Introduction To C Programming Arithmetic Statements Standard Input Output Mathematical Functions
PDF
No ratings yet
This Lab Exercise Covers: An Introduction To C Programming Arithmetic Statements Standard Input Output Mathematical Functions
4 pages
Fortran Programs For Physics Students
PDF
No ratings yet
Fortran Programs For Physics Students
51 pages