Home / C (page 2)

C

Program to Display Upper Triangular Matrix

What is Upper Triangular Matrix?  An upper triangular matrix is a square matrix in which all the elements below the diagonal are zero. We consider a Matrix U with ‘i’ rows and ‘j’ columns, then mathematically we represent the upper triangular matrix as In another word strictly upper triangular matrix is an upper triangular matrix having 0’s along the diagonal ...

Read More »

Program to check Upper Triangular matrix

What is Upper Triangular Matrix?  An upper triangular matrix is a square matrix in which all the elements below the diagonal are zero. We consider a Matrix U with ‘i’ rows and ‘j’ columns, then mathematically we represent the upper triangular matrix as In another word strictly upper triangular matrix is an upper triangular matrix having 0’s along the diagonal ...

Read More »

C program to Calculate Sum of Digits of a Number

C Program to find Digit Sum:  The digit sum of a given integer number is the sum of all its digits. The source code given here are for two methods or rather tricks in C language. Digit Sum Example:-   Digit Sum of 12321 is calculated 1+2+3+2+1=9. Digit Sum of 34236789754 is calculated 3+4+2+3+6+7+8+9+7+5+4=58. We have also given the Solution of the ...

Read More »

Bouncing Ball Program in C Graphics

Here is the C Program for Bouncing ball animation in computer Graphics. Download the source code given here for the bouncing ball problem. The colored bouncing ball moves along x and y axis using a loop and decreasing and increasing the value of x and y in order to move the ball.

Read More »

Ugly Numbers Algorithm – C and Java Program

C Program / Algorithm for Ugly Numbers:  What is an Ugly Number Series? Ugly Numbers are the ones whose prime factors are 2,3 or 5 Only. We have also given a Java Source code in Method #4 So Ugly Number Series is 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, and so on… The reason why 1 is added is because ...

Read More »

C Program to make a Calculator – Source Code

C Calculator Program Source Code : C program with full illustration in comments is given here for making a Calculator in C. You can make this Calculator program to perform any operations you want but we have made this only for following operations: Addition (a+b) Subtraction (a-b) Multiplication (a*b) Division (a/b) Modulus (a%b) Factorial (a!) Power (a^b) Remember you can add ...

Read More »

C program to add two numbers using recursion method

C program to add two numbers using recursion method | Without using Arithmetic operator :  This is a C program using recursion method for adding two numbers. Recursion method has always been difficult for many. So you can get the code here and understand on our own. Also Read: Swap two numbers without using third variable #include<stdio.h> int sum(int, int); ...

Read More »

C program for Sum of two number using While LOOP

C program for Sum of two number using While LOOP | Add two numbers using while loop : The two numbers can be added using a while loop also. If you want to know more about the conditional control statement and looping then you should start experimenting rather doing straight things. Two numbers can be added using arithmetic numbers but ...

Read More »

C program to add two numbers using for loop

C program to add two numbers using for loop | Sum of two numbers using for loop : This is a c program to add two numbers using for loop to know more concept about the looping and conditional control statements.  Also Read : C program for sum of two numbers using while loop #CODE for Sum of two numbers ...

Read More »