Skip to main content

#AddingDigitOfgivenNumber #sumOFgivenDigit || How to add given number di...


C programming is a stepping stone for many programmers in the programming world. C is best to learn internals of programming and know how a computer program works internally.

Since it is close to low level programming. Programming in C can be a nightmare for beginners if not practiced properly. However, you can learn and practice at Codeforwin step by step.
In this programming exercise we will focus on basics of C programming. After completing this exercise you will learn basic structure and semantics of a C program and how to write mathematical programs in C.

If you are not a beginner, still reached here. Hold your breath I am sure you will find these exercises interesting.


Always feel free to drop your questions in comments section. I love to hear hugs and bugs from you all.

Required knowledge
Operators, Data types, Variables and expression, Basic input/output

List of basic programming exercises
Write a C program to perform input/output of all basic data types.
Write a C program to enter two numbers and find their sum.
Write a C program to enter two numbers and perform all arithmetic operations.
Write a C program to enter length and breadth of a rectangle and find its perimeter.
Write a C program to enter length and breadth of a rectangle and find its area.
Write a C program to enter radius of a circle and find its diameter, circumference and area.
Write a C program to enter length in centimeter and convert it into meter and kilometer.
Write a C program to enter temperature in Celsius and convert it into Fahrenheit.
Write a C program to enter temperature in Fahrenheit and convert to Celsius
Write a C program to convert days into years, weeks and days.
Write a C program to find power of any number x ^ y.
Write a C program to enter any number and calculate its square root.
Write a C program to enter two angles of a triangle and find the third angle.
Write a C program to enter base and height of a triangle and find its area.
Write a C program to calculate area of an equilateral triangle.
Write a C program to enter marks of five subjects and calculate total, average and percentage.
Write a C program to enter P, T, R and calculate Simple Interest.
Write a C program to enter P, T, R and calculate Compound Interest.
Recommended posts
Bitwise operator programming exercises and solutions in C.
If else programming exercises and solutions in C.
Switch case programming exercise and solutions in C.
Conditional operators programming exercises and solutions in C.
Loop programming exercises and solutions in C.
Array programming exercises and solutions in C.
String programming exercises and solutions in C.
Function and recursion programming exercises and solutions in C.
Pointer programming exercises and solutions in C.

report this ad
About Pankaj
Pankaj Prakash is the founder, editor and blogger at Codeforwin. He loves to learn new techs and write programming articles especially for beginners. He works at Vasudhaika Software Sols. as a Software Design Engineer and manages Codeforwin. In short Pankaj is Web developer, Blogger, Learner, Tech and Music lover.

Follow on: Facebook | Twitter | Google | Website or View all posts by Pankaj

Post navigation

Previous
Next

Comments and discussion
Have a doubt, write here. I will help my best.
Before commenting you must escape your source code before commenting. Paste your source code inside

 ----Your Source Code---- 


Comments

Popular posts from this blog

How to Send OTP in Mobile Number | login with OTP mobile Number | How to send OTP in mobile no with Spring Boot APP

   ðŸ˜‚               Login with Mobile Number OTP ---------------------------------------------------------------------------- If you want to develop a project to log in with OTP mobile Number in Spring Boot Applications then this post for you. In this post, I am going to use some other service to send the OTP in mobile number. we have to use it in this project spring boot. we are going to use Twilio to send SMS. we are going to use a web socket to send the data from the browser to the SMS gateway. Oracle Database for store the user details. <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> <version>2.3.3.RELEASE</version> </dependency> <dependency> <groupId>com.twilio.sdk</grou

Spring Boot With MySQL Database connection with Examples | MySQl Database Configuration with Spring Boot Projects

 ðŸ˜ƒ MySQL Database Configuration with Spring Boot Projects  In this article, we are going to introduce How to connect MySQL Database with the Spring Boot project. pom.xml   <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>org.projectlombok</gro

How can we create Auto generated field or ID for mongodb using spring boot

😂 How can we create an Auto-generated field or ID for MongoDB using spring boot? First Create One Application Like Mongodb_sequence-id-generator Pom.XML <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-mongodb</artifactId> </dependency> <dependency> <groupId>de.flapdoodle.embed</groupId> <artifactId>de.flapdoodle.embed.mongo</artifactId> </dependency> User.java package com.app; import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Transient; import org.springframework.data.mongodb.core.mapping.Document; @Document(collection = "users_db") public class User { @Transient public static final String SEQUENCE_NAME = &