SlideShare a Scribd company logo
1 of 2
1. WAP to calculate addition of two given values and display result on output screen. [without scanf( )].
2. WAP to calculate average of 5 given float values and display result on output screen. [without scanf( )].
3. WAP to take input for two user-defined values and perform following calculations. [take i/p using scanf( )].
- add=a+b
- sub=a-b
- mul=a*b
- div=a/b
4. WAP to calculate area of circle and circumference of circle according to value of radius given as input.
[Area=3.14*R*R ] [Circumference=2*3.14*R].
5. WAP to calculate area of rectangle and perimeter of rectangle according to value of length & breadth given
as input. [Area=L*B ] [Perimeter=2*(L+B)].
6. WAP to calculate simple interest according to value of principle, rate of interest & no of years given as
input. [SI = (p*r*n)/100].
7. WAP to convert temperature from Celsius to Fahrenheit. [F=(C*1.8)+32]
8. WAP to convert temperature from Fahrenheit to Celsius. [C= (F – 32)/1.8].
9. WAP to calculate volume of cylinder according to radius & height entered as input. [V=3.14*R*R*H].
10. WAP to calculate volume of cube according to value of side entered as input. [V=S*S*S].
11. WAP to swap values of two variables using third variable.
12. WAP to swap values of two variables without using temp.
13. WAP to check whether number entered is even or odd.
14. WAP to find largest number from 2 numbers entered as input.
15. WAP to find smallest from 2 numbers entered as input.
16. WAP to check whether year entered is leap year or not. [The year entered as input should be of four digits].
17. WAP which takes marks of 5 subjects & roll-no as input and calculate total & percentage also print result in
terms of [distinction (>=70) , first-class(>=60 & <=70),second-class(>=50 & <=60),pass-class(>=45 &
<=50) else fail]. [elseif ladder]
18. A cloth showroom has announced the following discounts on purchase of cloth worth Rs as follow:-
 If purchase amount if less than 50 customer will not get any discount.
 Display amount before discount, discount offered & amount after discount to be paid by customer.
PURCHASE AMOUNT DISCOUNT RATES
51 – 100 5%
101-200 7.5%
201-300 10%
Above 300 15%
19. An electric power distribution company charges its customer as follow:
Take input for customer number & consumption units.
Consumption Units Rates of charge
0-200 Rs. 0.50 per unit
201-400 Rs 100 plus Rs 0.65 per unit excess of 200
401-600 Rs 230 plus Rs 0.80 per unit excess of 400
601 and above Rs 390 plus Rs 1.00 per unit excess of 600
20. WAP to create choice based calculator which takes input for two values and performs calculation for [+,-,*,
/]. [switch case & else if ladder].
21. WAP to check whether number entered is positive, negative or zero.
22. WAP to create choice based converter which takes input for distance in kM and carries conversion to [m,
cm, mm, feet & inch]. [switch case][make use of goto statement]
23. WAP to find largest from 3 numbers entered as input. [elseif ladder & nesting]
24. WAP to find smallest from 3 numbers entered as input.
25. WAP to print series of natural numbers starting for n upto 1. [use for loop].
26. WAP to print series of odd numbers from 1 to n terms.
27. WAP to print series of even numbers from 2 to n terms.
28. WAP to print series of numbers divisible by 7 starting from 7 to n terms. Find sum & count them.
29. WAP to print series 1,4,9,…..n terms
30. WAP to print series 1,11,111,…..n terms
31. WAP to print series 1, 8, 27……n terms.
32. WAP to print series 21, 24,27 …..n terms.
33. WAP to print series 2-4+6-8…..n terms.
34. WAP to print Fibonacci series 1,1,2,3,…n terms
35. WAP to print power of number entered as input.
36. WAP to find factorial of number entered as input.
37. WAP to print following patterns upto n terms.:-
* **** 1 1 1234 4444 1
** *** 12 22 123 333 23
*** ** 123 333 12 22 456
**** * 1234 4444 1 1 78910
4 4321 A A A ABCD DDDD
43 321 AB BB BC ABC CCC
432 21 ABC CCC DEF AB BB
4321 1 ABCD DDDD GHIJ A A
DCBA * **** 1234 4 A 1
DCB ** *** 234 34 BB 1 2 1
DC *** ** 34 234 CCC 1 2 3 2 1
D **** * 4 1234 DDDD 1 2 3 4 3 2 1
A 12321
ABA 121
ABCBA 1
ABCDBCA
38. WAP to find number entered as input is prime or composite.
39. WAP to check number entered as input is ARMSTRONG or not.
40. WAP to check number entered as input is PERFECT number or not.
41. WAP to reverse the number entered as input.
42. WAP to find sum of digits for number entered as input.
43. WAP to check number entered as input is palindrome or not.
44. WAP to print series of odd numbers using while loop statements.
45. WAP to print series of even numbers using do….while loop statements.

More Related Content

What's hot

Ex1 d sketchlinfuncs
Ex1 d sketchlinfuncsEx1 d sketchlinfuncs
Ex1 d sketchlinfuncs
giovanniL
 

What's hot (20)

3 d tfs fabric spec silicone line
3 d tfs fabric spec silicone line3 d tfs fabric spec silicone line
3 d tfs fabric spec silicone line
 
Core 3 Functions 2
Core 3 Functions 2Core 3 Functions 2
Core 3 Functions 2
 
Sequential multiplication
Sequential multiplicationSequential multiplication
Sequential multiplication
 
Parallel Adder and Subtractor
Parallel Adder and SubtractorParallel Adder and Subtractor
Parallel Adder and Subtractor
 
Examplelf flowchart
Examplelf flowchartExamplelf flowchart
Examplelf flowchart
 
Multiplication algorithm, hardware and flowchart
Multiplication algorithm, hardware and flowchartMultiplication algorithm, hardware and flowchart
Multiplication algorithm, hardware and flowchart
 
C 14-dce-107-engg drawing
C 14-dce-107-engg drawingC 14-dce-107-engg drawing
C 14-dce-107-engg drawing
 
Bucket sort
Bucket sortBucket sort
Bucket sort
 
C- Programming Assignment practice set 2 solutions
C- Programming Assignment practice set 2 solutionsC- Programming Assignment practice set 2 solutions
C- Programming Assignment practice set 2 solutions
 
Solicitud inmofianza aprobada bucaramanga
Solicitud inmofianza aprobada bucaramangaSolicitud inmofianza aprobada bucaramanga
Solicitud inmofianza aprobada bucaramanga
 
Ex1 d sketchlinfuncs
Ex1 d sketchlinfuncsEx1 d sketchlinfuncs
Ex1 d sketchlinfuncs
 
Percentage Difference Calculator
Percentage Difference CalculatorPercentage Difference Calculator
Percentage Difference Calculator
 
Moving Straight Ahead 2.3
Moving Straight Ahead 2.3Moving Straight Ahead 2.3
Moving Straight Ahead 2.3
 
Multiplication algorithm
Multiplication algorithmMultiplication algorithm
Multiplication algorithm
 
C - Programming Assignment 1 and 2
C - Programming Assignment 1 and 2C - Programming Assignment 1 and 2
C - Programming Assignment 1 and 2
 
Chapter 2 section 1
Chapter 2 section 1Chapter 2 section 1
Chapter 2 section 1
 
Simple formcalculations
Simple formcalculationsSimple formcalculations
Simple formcalculations
 
010 lesson 2
010 lesson 2010 lesson 2
010 lesson 2
 
7 Examples of C Program (Civil Engineering)
7 Examples of C Program (Civil Engineering)7 Examples of C Program (Civil Engineering)
7 Examples of C Program (Civil Engineering)
 
SMU BCA SEM 1 FALL 2016 ASSIGNMENTS
SMU BCA SEM 1 FALL 2016 ASSIGNMENTSSMU BCA SEM 1 FALL 2016 ASSIGNMENTS
SMU BCA SEM 1 FALL 2016 ASSIGNMENTS
 

Viewers also liked

C the basic concepts
C the basic conceptsC the basic concepts
C the basic concepts
Abhinav Vatsa
 

Viewers also liked (12)

Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programming
 
C++ aptitude
C++ aptitudeC++ aptitude
C++ aptitude
 
C aptitude 1st jan 2012
C aptitude 1st jan 2012C aptitude 1st jan 2012
C aptitude 1st jan 2012
 
C programming tutorial for beginners
C programming tutorial for beginnersC programming tutorial for beginners
C programming tutorial for beginners
 
C Programing Solve Presentation -CSE
C Programing Solve Presentation -CSEC Programing Solve Presentation -CSE
C Programing Solve Presentation -CSE
 
Gi_Fi - The Wireless Tehcnology
Gi_Fi - The Wireless TehcnologyGi_Fi - The Wireless Tehcnology
Gi_Fi - The Wireless Tehcnology
 
C the basic concepts
C the basic conceptsC the basic concepts
C the basic concepts
 
Gi fi technology finl ppt
Gi fi technology finl pptGi fi technology finl ppt
Gi fi technology finl ppt
 
Gi-Fi ppt presentation
Gi-Fi ppt presentationGi-Fi ppt presentation
Gi-Fi ppt presentation
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
 
Deep C
Deep CDeep C
Deep C
 

Similar to c language programing

List of programs for practical file
List of programs for practical fileList of programs for practical file
List of programs for practical file
swatisinghal
 
Case Study 3 Production Cost Perfect Comp Answer Sheet - new
Case Study 3 Production Cost Perfect Comp Answer Sheet - newCase Study 3 Production Cost Perfect Comp Answer Sheet - new
Case Study 3 Production Cost Perfect Comp Answer Sheet - new
Kayla Davenport
 
SQL-AGG-FUN.pdfiiiijuyyttfffgyyuyyyyyhhh
SQL-AGG-FUN.pdfiiiijuyyttfffgyyuyyyyyhhhSQL-AGG-FUN.pdfiiiijuyyttfffgyyuyyyyyhhh
SQL-AGG-FUN.pdfiiiijuyyttfffgyyuyyyyyhhh
NaveeN547338
 

Similar to c language programing (20)

Microprocessor lab
Microprocessor labMicroprocessor lab
Microprocessor lab
 
63610-80-20 CalibrationTC
63610-80-20 CalibrationTC63610-80-20 CalibrationTC
63610-80-20 CalibrationTC
 
Spl book salution
Spl book salutionSpl book salution
Spl book salution
 
List of programs for practical file
List of programs for practical fileList of programs for practical file
List of programs for practical file
 
Project Report On 0-9 decade counter
Project Report On 0-9 decade counterProject Report On 0-9 decade counter
Project Report On 0-9 decade counter
 
SQL sheet
SQL sheetSQL sheet
SQL sheet
 
Isc computer project final upload last
Isc computer project final upload lastIsc computer project final upload last
Isc computer project final upload last
 
GSP 215 RANK Become Exceptional--gsp215rank.com
GSP 215 RANK Become Exceptional--gsp215rank.comGSP 215 RANK Become Exceptional--gsp215rank.com
GSP 215 RANK Become Exceptional--gsp215rank.com
 
GSP 215 RANK Achievement Education--gsp215rank.com
GSP 215 RANK Achievement Education--gsp215rank.comGSP 215 RANK Achievement Education--gsp215rank.com
GSP 215 RANK Achievement Education--gsp215rank.com
 
Chap. 7.pptx
Chap. 7.pptxChap. 7.pptx
Chap. 7.pptx
 
Auto cad3d yon dara
Auto cad3d yon daraAuto cad3d yon dara
Auto cad3d yon dara
 
LMmanual.pdf
LMmanual.pdfLMmanual.pdf
LMmanual.pdf
 
Paper id 27201434
Paper id 27201434Paper id 27201434
Paper id 27201434
 
SQL Practice Question set
SQL Practice Question set SQL Practice Question set
SQL Practice Question set
 
programming for programs solving using C language
programming for  programs solving using C languageprogramming for  programs solving using C language
programming for programs solving using C language
 
Cs practical file
Cs practical fileCs practical file
Cs practical file
 
Case Study 3 Production Cost Perfect Comp Answer Sheet - new
Case Study 3 Production Cost Perfect Comp Answer Sheet - newCase Study 3 Production Cost Perfect Comp Answer Sheet - new
Case Study 3 Production Cost Perfect Comp Answer Sheet - new
 
TSP-MIN.-SPANNING-TREE.pptx
TSP-MIN.-SPANNING-TREE.pptxTSP-MIN.-SPANNING-TREE.pptx
TSP-MIN.-SPANNING-TREE.pptx
 
Dti lab 1
Dti lab 1Dti lab 1
Dti lab 1
 
SQL-AGG-FUN.pdfiiiijuyyttfffgyyuyyyyyhhh
SQL-AGG-FUN.pdfiiiijuyyttfffgyyuyyyyyhhhSQL-AGG-FUN.pdfiiiijuyyttfffgyyuyyyyyhhh
SQL-AGG-FUN.pdfiiiijuyyttfffgyyuyyyyyhhh
 

Recently uploaded

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
SoniaTolstoy
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Krashi Coaching
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Recently uploaded (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 

c language programing

  • 1. 1. WAP to calculate addition of two given values and display result on output screen. [without scanf( )]. 2. WAP to calculate average of 5 given float values and display result on output screen. [without scanf( )]. 3. WAP to take input for two user-defined values and perform following calculations. [take i/p using scanf( )]. - add=a+b - sub=a-b - mul=a*b - div=a/b 4. WAP to calculate area of circle and circumference of circle according to value of radius given as input. [Area=3.14*R*R ] [Circumference=2*3.14*R]. 5. WAP to calculate area of rectangle and perimeter of rectangle according to value of length & breadth given as input. [Area=L*B ] [Perimeter=2*(L+B)]. 6. WAP to calculate simple interest according to value of principle, rate of interest & no of years given as input. [SI = (p*r*n)/100]. 7. WAP to convert temperature from Celsius to Fahrenheit. [F=(C*1.8)+32] 8. WAP to convert temperature from Fahrenheit to Celsius. [C= (F – 32)/1.8]. 9. WAP to calculate volume of cylinder according to radius & height entered as input. [V=3.14*R*R*H]. 10. WAP to calculate volume of cube according to value of side entered as input. [V=S*S*S]. 11. WAP to swap values of two variables using third variable. 12. WAP to swap values of two variables without using temp. 13. WAP to check whether number entered is even or odd. 14. WAP to find largest number from 2 numbers entered as input. 15. WAP to find smallest from 2 numbers entered as input. 16. WAP to check whether year entered is leap year or not. [The year entered as input should be of four digits]. 17. WAP which takes marks of 5 subjects & roll-no as input and calculate total & percentage also print result in terms of [distinction (>=70) , first-class(>=60 & <=70),second-class(>=50 & <=60),pass-class(>=45 & <=50) else fail]. [elseif ladder] 18. A cloth showroom has announced the following discounts on purchase of cloth worth Rs as follow:-  If purchase amount if less than 50 customer will not get any discount.  Display amount before discount, discount offered & amount after discount to be paid by customer. PURCHASE AMOUNT DISCOUNT RATES 51 – 100 5% 101-200 7.5% 201-300 10% Above 300 15% 19. An electric power distribution company charges its customer as follow: Take input for customer number & consumption units. Consumption Units Rates of charge 0-200 Rs. 0.50 per unit 201-400 Rs 100 plus Rs 0.65 per unit excess of 200 401-600 Rs 230 plus Rs 0.80 per unit excess of 400
  • 2. 601 and above Rs 390 plus Rs 1.00 per unit excess of 600 20. WAP to create choice based calculator which takes input for two values and performs calculation for [+,-,*, /]. [switch case & else if ladder]. 21. WAP to check whether number entered is positive, negative or zero. 22. WAP to create choice based converter which takes input for distance in kM and carries conversion to [m, cm, mm, feet & inch]. [switch case][make use of goto statement] 23. WAP to find largest from 3 numbers entered as input. [elseif ladder & nesting] 24. WAP to find smallest from 3 numbers entered as input. 25. WAP to print series of natural numbers starting for n upto 1. [use for loop]. 26. WAP to print series of odd numbers from 1 to n terms. 27. WAP to print series of even numbers from 2 to n terms. 28. WAP to print series of numbers divisible by 7 starting from 7 to n terms. Find sum & count them. 29. WAP to print series 1,4,9,…..n terms 30. WAP to print series 1,11,111,…..n terms 31. WAP to print series 1, 8, 27……n terms. 32. WAP to print series 21, 24,27 …..n terms. 33. WAP to print series 2-4+6-8…..n terms. 34. WAP to print Fibonacci series 1,1,2,3,…n terms 35. WAP to print power of number entered as input. 36. WAP to find factorial of number entered as input. 37. WAP to print following patterns upto n terms.:- * **** 1 1 1234 4444 1 ** *** 12 22 123 333 23 *** ** 123 333 12 22 456 **** * 1234 4444 1 1 78910 4 4321 A A A ABCD DDDD 43 321 AB BB BC ABC CCC 432 21 ABC CCC DEF AB BB 4321 1 ABCD DDDD GHIJ A A DCBA * **** 1234 4 A 1 DCB ** *** 234 34 BB 1 2 1 DC *** ** 34 234 CCC 1 2 3 2 1 D **** * 4 1234 DDDD 1 2 3 4 3 2 1 A 12321 ABA 121 ABCBA 1 ABCDBCA 38. WAP to find number entered as input is prime or composite. 39. WAP to check number entered as input is ARMSTRONG or not. 40. WAP to check number entered as input is PERFECT number or not. 41. WAP to reverse the number entered as input. 42. WAP to find sum of digits for number entered as input. 43. WAP to check number entered as input is palindrome or not. 44. WAP to print series of odd numbers using while loop statements. 45. WAP to print series of even numbers using do….while loop statements.