## Find Sum Of Digit For Given Value By User.

This problem will calculate the sum of all digit in the value give by user. #include<stdio.h> void main() { long long no,temp; int rem,sum=0; printf(“\n\tEnter 5 to 6 digit number “); scanf(“%lld”,&no); temp=no; //printf(“no=%ld”,no); do { while(temp!=0) { rem=temp%10; //// printf(“rem=%d\n”,rem); sum=sum+rem; temp=temp/10; } //printf(“\nsum… Read More »Find Sum Of Digit For Given Value By User.

## A pharmaceutical company provides solution to complete a chemical process. Time and resources taken by chemical process depends on set of chemical compounds as an input conditions.

The Detailed Problem Is Describe Below. A pharmaceutical company provides solution to complete a chemical process. Time and resources taken by chemical process depends on set of chemical compounds as an input conditions. Company charges on the following basis: •      If number of hours required… Read More »A pharmaceutical company provides solution to complete a chemical process. Time and resources taken by chemical process depends on set of chemical compounds as an input conditions.

## To calculate the average of five numbers.

This Program calculate the average of five numbers. This gives basic working of C Program. #include<stdio.h> void main() { int no1,no2,no3,no4,no5,sum; float avg; printf(“\n\tEnter First Number “); scanf(“%d”,&no1); printf(“\n\tEnter Second Number “); scanf(“%d”,&no2); printf(“\n\tEnter Third Number “); scanf(“%d”,&no3); printf(“\n\tEnter Fourth Number “); scanf(“%d”,&no4); printf(“\n\tEnter Fifth… Read More »To calculate the average of five numbers.

## To perform the sum of three numbers and print the sum.

This Program will give basic data type of c and perform sum of this three number. #include<stdio.h> void main() { int no1,no2,no3,sum; printf(“\n\tEnter First Number “); scanf(“%d”,&no1); printf(“\n\tEnter Second Number “); scanf(“%d”,&no2); printf(“\n\tEnter Third Number “); scanf(“%d”,&no3); sum=no1+no2+no3; printf(“\n\t_____________________________________________”); printf(“\n\n\tSum Of %d, %d And %d… Read More »To perform the sum of three numbers and print the sum.

## Find the roots of a quadratic equation.

#include <math.h> #include <stdio.h> void main() { double a, b, c, d, root1, root2, realPart, imagPart; printf(“Enter coefficients a, b and c: “); scanf(“%lf %lf %lf”, &a, &b, &c); d = b * b – 4 * a * c; if (d > 0) {… Read More »Find the roots of a quadratic equation.

## do…while Loop In C

As discussed before, loop contains three part Intialization Condition Checking Incrementation Or Decrementation do…while loop is also called exit control loop, it means that the statement of loop are always executed once even if the condition is false. In this while is ended by semicolon(;).… Read More »do…while Loop In C

## Simple while Loop In C

As we discussed before the loop have three parts. Initialization Condition Checking Increment Or Decrement Part while loop is known as entry control loop, in this if the condition is true then the statement inside loop will be executed. Syntax variable=0; while(condition) { code statement… Read More »Simple while Loop In C

## Basic for Loop In C

for loop consists of three parts in a sequence. Initialization: Use to initialize the loop variable. Condition: It is checked after each iteration as an entry point to the loop. Increment or Decrement: Incrementing or Decrementing the loop variable to eventually terminate the loop not… Read More »Basic for Loop In C

## Print The Largest And Smallest Using Global Declaration

Some important points to be note about Global variable declaration are: It can be used anywhere within the program. Unlike local variables that can be used within the scope of a particular function. & is used to assign the input value to the variable and… Read More »Print The Largest And Smallest Using Global Declaration

## Swapping Of Two Numbers Using Temporary Variable, Without Temp Variable, Using Bitwise Operator, Using Multiplication And Division

Swapping means change the value of two variables with one another. There is basically four ways to perform swapping that are listed below. Using Temporary Variable Without Using Temporary Variable Using Bitwise Operator Using Multiplication And Division Using Temporary Variable In this, the anothe temporary… Read More »Swapping Of Two Numbers Using Temporary Variable, Without Temp Variable, Using Bitwise Operator, Using Multiplication And Division