{"id":23,"date":"2016-10-09T05:33:29","date_gmt":"2016-10-09T05:33:29","guid":{"rendered":"http:\/\/54.169.157.34\/blog\/?p=23"},"modified":"2025-08-07T09:24:40","modified_gmt":"2025-08-07T09:24:40","slug":"basic-programs","status":"publish","type":"post","link":"https:\/\/codeinsightacademy.com\/blog\/c-programming\/basic-programs\/","title":{"rendered":"Basic Programs"},"content":{"rendered":"<h3>1. WAP to read radius of circle and calculate Area and Circumference<\/h3>\n<p><strong>Input:<\/strong><br \/>\nEnter radius: 5<br \/>\n<strong>Output:<\/strong><br \/>\nArea of circle is 78.5<br \/>\nCircumference of circle is 31.5<\/p>\n<hr \/>\n<h3>2. WAP to read 3 numbers and find their mean<\/h3>\n<p><strong>Input:<\/strong><br \/>\nEnter number 1: 5<br \/>\nEnter number 2: 6<br \/>\nEnter number 3: 7<br \/>\n<strong>Output:<\/strong><br \/>\nMean of 5, 6 and 7 is 6<\/p>\n<hr \/>\n<h3>3. WAP to read 2 numbers and find Sum of their last digit<\/h3>\n<p><strong>Input:<\/strong><br \/>\nEnter number 1: 52<br \/>\nEnter number 2: 65<br \/>\n<strong>Output:<\/strong><br \/>\n2 + 5 = 7<\/p>\n<hr \/>\n<h3>4. WAP to read 4-digit number and sum of its digits<\/h3>\n<p><strong>Input:<\/strong><br \/>\nEnter a number: 1234<br \/>\n<strong>Output:<\/strong><br \/>\n1 + 2 + 3 + 4 = 10<\/p>\n<hr \/>\n<h3>5. WAP to read radius of Sphere and find its Volume<\/h3>\n<p><strong>Input:<\/strong><br \/>\nEnter radius: 5<br \/>\n<strong>Output:<\/strong><br \/>\nVolume of sphere having radius 5 is 523.6<\/p>\n<hr \/>\n<h3>6. WAP to read 3-digit number and sum of its digits<\/h3>\n<p><strong>Input:<\/strong><br \/>\nEnter a number: 123<br \/>\n<strong>Output:<\/strong><br \/>\n1 + 2 + 3 = 6<\/p>\n<hr \/>\n<h3>7. WAP to read 4-digit number and find reverse of that number<\/h3>\n<p><strong>Input:<\/strong><br \/>\nEnter a number: 1234<br \/>\n<strong>Output:<\/strong><br \/>\nReverse of 1234 is 4321<\/p>\n<hr \/>\n<h3>8. WAP to read temperature in Celsius and convert it into Fahrenheit<\/h3>\n<p><strong>Input:<\/strong><br \/>\nEnter temperature in Celsius: 38<br \/>\n<strong>Output:<\/strong><br \/>\nTemperature in Fahrenheit is 100.4<\/p>\n<hr \/>\n<h3>9. WAP to read value in inches and print it in feet and inches<\/h3>\n<p><strong>Input:<\/strong><br \/>\nEnter length in inches: 20<br \/>\n<strong>Output:<\/strong><br \/>\n20 inches is equal to 1 foot and 8 inches<\/p>\n<hr \/>\n<h3>10. WAP to read marks of 5 subjects and print total and percentage<\/h3>\n<p><strong>Input:<\/strong><br \/>\nEnter marks for Maths: 50<br \/>\nEnter marks for Science: 50<br \/>\nEnter marks for History: 50<br \/>\nEnter marks for English: 50<br \/>\nEnter marks for Marathi: 50<br \/>\n<strong>Output:<\/strong><br \/>\nTotal Marks: 250<br \/>\nPercentage: 50%<\/p>\n<hr \/>\n<h3>11. WAP to read 2 numbers and exchange their values using third variable<\/h3>\n<p><strong>Input:<\/strong><br \/>\nEnter value for x: 5<br \/>\nEnter value for y: 6<br \/>\n<strong>Output:<\/strong><br \/>\nAfter swapping value of x is 6 and value of y is 5<\/p>\n<hr \/>\n<h3>12. WAP to read 2 numbers and exchange their values without using third variable<\/h3>\n<p><strong>Input:<\/strong><br \/>\nEnter value for x: 5<br \/>\nEnter value for y: 6<br \/>\n<strong>Output:<\/strong><br \/>\nAfter swapping value of x is 6 and value of y is 5<\/p>\n<hr \/>\n<h3>13. WAP to read Length, Breadth and Height and find its volume and surface area<\/h3>\n<p><strong>Input:<\/strong><br \/>\nEnter length: 5<br \/>\nEnter breadth: 6<br \/>\nEnter height: 7<br \/>\n<strong>Output:<\/strong><br \/>\nVolume of box is 210<br \/>\nSurface area of box is 214<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. WAP to read radius of circle and calculate Area and Circumference Input: Enter radius: 5 Output: Area of circle is 78.5 Circumference of circle is 31.5 2. WAP to read 3 numbers and find their mean Input: Enter number 1: 5 Enter number 2: 6 Enter number 3: 7 Output: Mean of 5, 6 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,3,18,4,9],"tags":[],"_links":{"self":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts\/23"}],"collection":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/comments?post=23"}],"version-history":[{"count":19,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts\/23\/revisions"}],"predecessor-version":[{"id":2854,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts\/23\/revisions\/2854"}],"wp:attachment":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/media?parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/categories?post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/tags?post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}