## Write C program to find Exponent Power Series Updated on 12-Dec-2021 20:35:06
Program : A program to evaluate the power series x2 x3 xn ex = 1 + x + --- + --- + ..... + ---- 2! 3! n! , 0 < x < 1 It uses if……else to test the accuracy. The power series contains the recurrence relationship of the type Tn = Tn-1 (---) for n > 1 T1 = x for n = 1 T0 = 1 If Tn-1 (usually known as previous term) is known, then Tn (known as present term) can be easily found by multiplying the previous ter... Read More

## Write a ‘C’ Program to compute the sum of all elements stored in an array using pointers Updated on 12-Dec-2021 20:35:39
C Program to compute sum of the array elements using pointers Program : #include <stdio.h> #include <conio.h> void main() { int numArray; int i, sum = 0; int *ptr; printf("\nEnter 10 elements : "); for (i = 0; i < 10; i++) scanf("%d", &numArray[i]); ptr = numArray; /* a=&a */ for (i = 0; i < 10; i++) { sum = sum + *ptr; ptr++; } printf("The sum of array elements : %d", sum); } Outpu... Read More

## How to check the type of triangle using C Updated on 12-Dec-2021 17:04:29
C Program to check the type of triangle #include <stdio.h> #include <math.h> int main() { int side1, side2, side3; //Change values accordingly side1 = 5; side2 = 4; side3 = 3; if ((side1 + side2 > side3 && side1 + side3 > side2 && side2 + side3 > side1) && (side1 > 0 && side2 > 0 && side3 > 0)) { if (side1 == side2 && side2 == side3) { printf("Equilateral... Read More

## How to Calculate Area of Circle using C Programming Updated on 12-Dec-2021 13:17:37
C Program to Calculate Area of Circle Shape : Circle Formula : Π * r * r Definition : 1. Ellipse in which the two axes are of equal length 2. Plane curve generated by one point moving at a constant distance from a fixed point 3. You can compute the area of a Circle if you know its radius. Program : #include <stdio.h> int main() { float radius, area; printf("\nEnter the radius of Circle : "); scanf("%d", &radius); area = 3.14 * radius * radius;... Read More

## How to Calculate Area of Rectangle using C Program Updated on 12-Dec-2021 13:06:07
C Program to Calculate Area of Rectangle Shape : Rectangle formula : area = l * b Definition : 1. A plane figure with 4 sides and 4 right angles and having Equal Opposite Sides 2. Adjucent sides makes an angle of 90 degree 3. You can compute the area of a Rectangle if you know its length and breadth Program :  #include <stdio.h> #include <conio.h> int main() { int length, breadth, area; printf("\nEnter the Length of Rectangle : "); scanf("%d", &... Read More

## How to Calculate Area of Right angle Triangle using C Language Updated on 09-Apr-2023 10:53:03
C Program to Calculate Area of Right angle Triangle Definition : Triangle having one angle of measure 90 degree is called Right angle Triangle. Sides of Triangle are : base , height , hypotenuse. You can compute the area of a Traingle. if you know its any two sides. Program :  #include <stdio.h> int main() { int base, height; float area; printf("\nEnter the base of Right Angle Triangle : "); scanf("%d", &base); printf("\nEnte... Read More

## How to Find Area of Scalene Triangle using C Updated on 12-Dec-2021 12:44:54
C Program to Find Area of Scalene Triangle : #include <stdio.h> #include <math.h> int main() { int s1, s2, angle; float area; printf("\nEnter Side1 : "); scanf("%d", &s1); printf("\nEnter Side2 : "); scanf("%d", &s2); printf("\nEnter included angle : "); scanf("%d", &angle); area = (s1 * s2 * sin((M_PI / 180) * angle)) / 2; printf("\nArea of Scalene Triangle : %f", area); return (0); } Output : Ente... Read More

## How to Calculate Area of Equilatral Triangle using C Language Updated on 12-Dec-2021 9:59:37
#include<stdio.h> #include<math.h> int main() { int side; float area, r_4; r_4 = sqrt(3) / 4; printf("\nEnter the Length of Side : "); scanf("%d", &side); area = r_4 * side * side; printf("\nArea of Equilateral Triangle : %f", area); return (0); } Output : Enter the Length of Side : 5 Area of Equilateral Triangle : 10.82 Properties of Equilateral Triangle : Equilateral triangle is a triangle in which all three sides a... Read More

## How to print hello world using C Language Updated on 12-Dec-2021 9:39:30
In this example, you will learn to print "Hello, World!" on the screen in C programming. #include <stdio.h> int main() { // printf() displays the string inside quotation printf("Hello, World!"); return 0; } Output : Hello, World! ... Read More

## How to Check Whether Number is Perfect Or Not using C Updated on 04-Apr-2023 8:23:19
C Program to Check Whether Number is Perfect Or Not Hello there, in this tutorial we will learn to check whether number is perfect or not using c programming ? Also Use : Perfect Number Checker Tool What Is Perfect Number : A perfect number is a positive integer that is equal to the sum of its positive divisors, excluding the number itself. #include <stdio.h> int main() { int num, i = 1, sum = 0; printf("Enter a number: "); scanf("%d", &num); while (i < num) { i... Read More