C program to check whether number is even or odd using function

In this program, we will write separate function to find even or odd number and then call that function from main method. This works through function call where we simply put function name inside main method and then compiler executes that function and returns to main method. This program is somewhat similar to even or … Read moreC program to check whether number is even or odd using function

C program to find sum of even and odd numbers using while loop

In this program, we will go through even or odd numbers scenario and check even or odd numbers and print their sum at end of the program. Pre-requisites: Input output statements, main method, do while loop. Approach: C program to find and print even and odd numbers from 1 to NWe have already discussed in … Read moreC program to find sum of even and odd numbers using while loop

C program to find and print even and odd numbers from 1 to N

As per the title of our program, we will here understand how to find sum of even numbers in c. Before writing source code, take a look at example of even numbers. E.g. 2, 4, 6 and 8 and so on, etc. You can notice one thing that all these numbers are perfectly divisible when … Read moreC program to find and print even and odd numbers from 1 to N

C program to find area of circle using function

We will start with mentioned topic i.e. finding area of circle using programming language c. Before starting with our logic, let’s see brief description of circle and area of circle. We will put this in simple words as all area present inside circle is area of circle. To get circle’s area, standard formula used is … Read moreC program to find area of circle using function

C program to find average of 5 numbers using do while loop

Here we will write source code in c to find and print average of 5 integers using do while loop. To find the average, we are simply going to use an array for the purpose of storing input and then do calculation inside do while loop by putting logic into the body of do while … Read moreC program to find average of 5 numbers using do while loop

C program to find average of 5 numbers using functions

In this program, you will learn to make use of functions in source code to do calculations or logic implementation. We will find average of 5 numbers here and for that we will write separate function which will be called upon whenever and wherever in program. Pre-requisites: You should have basic knowledge of data types, … Read moreC program to find average of 5 numbers using functions

C program to find average of 5 numbers using for loop

In this program, we will learn how to find average of 5 numbers using for loop. Here we will capture input from user and store it into array of integers using for loop. We will iterate through array putting input values at indexed location from 0 to n. You will learn more about the approach … Read moreC program to find average of 5 numbers using for loop

C program to find average of 5 numbers

In this program, we are going to write a solution to find out average of 5 numbers. To calculate average of numbers, we need to first do addition of all numbers and then divide the sum by count of numbers. Formula for average is average_of_numbers = sum_of_numbers / count_of_numbers_in_set. Pre-requisites: If you are complete beginner … Read moreC program to find average of 5 numbers

C program for floating point arithmetic operation using switch case statement

Here we will perform different arithmetic operations on floating point data provided as input and we will use switch case statement for this purpose. This program is going to be similar to last program we did for arithmetic operations on integer data. Pre-requisites: Data types, input output functions, switch case statement. Approach: we will take … Read moreC program for floating point arithmetic operation using switch case statement

C program to perform arithmetic operation using switch case

Here we are going to perform the arithmetic operation with help of switch case statement. Switch case in c language is used when we are performing multiple operations where user can select from the set of operations and choose which operation to do amongst those. Pre-requisites: User should have knowledge about input output functions, switch … Read moreC program to perform arithmetic operation using switch case