Program to accept a list of numbers and display it in reverse order using function concept

Friday, October 7th, 2011  »  Posted By  »  Total 0 Comment

This program accepts a list of numbers and displays it in reverse order using function concept. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 #include "stdio.h" #include "conio.h"   int a[5],b[5];   [...]

program to accept ten numbers from the user and display the lowest one

Friday, October 7th, 2011  »  Posted By  »  Total 3 Comments

This program accepts ten numbers from the user and display the lowest one, 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 #include "conio.h" #include "stdio.h"   void main() { int num[10],low,i=0,j=1; printf("\nPlease provide 10 numbers to find lowest one [...]

Program to accept ten numbers from the user and display the largest one

Friday, October 7th, 2011  »  Posted By  »  Total 0 Comment

This program accepts ten numbers from the user and displays the largest one,

Program to find the value of the polynomial f(x)=a4x4+a3x3+a2x2+a1x+a0 using Horner’s method

Monday, September 5th, 2011  »  Posted By  »  Total 0 Comment

Here is the program to find the value of the polynomial f(x)=a4x^4+a3x^3+a2x^2+a1^x+a0 using Horner’s method 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 #include "stdio.h" #include "conio.h" void main() { float a[100],sum=0,x; int n,i; clrscr(); printf("Enter the degree of [...]

C program to calculate the GCD of a number

Sunday, April 4th, 2010  »  Posted By  »  Total 0 Comment

Write a program to calculate the Greatest Common Divisor(GCD) of a number #include<stdio.h> #include<conio.h> #include<process.h> int gcd(int m,int n) { int rem; while(n!=0) { rem=m%n; m=n; n=rem; } return(m); } main() { int num1,num2,num3,gcd1,gcd2; clrscr(); printf("Enter three positive integers"); scanf("%d%d%d",&num1,&num2,&num3); if(num1==0 && num2==0 && num3==0) { printf("\n Invalid number"); exit(0); } gcd1=gcd(num1,num2); gcd2=gcd(num3,gcd1); printf("\n GCD [...]

C program for finding remainder

Sunday, September 20th, 2009  »  Posted By  »  Total 0 Comment

OUTPUT:
enter frame:
1 0 1 1 0 1 0 0
enter generator:
1 0 1 0
remainder is:
0 0 1 0

To find the sum of the cos series

Thursday, December 4th, 2008  »  Posted By  »  Total 0 Comment

Here is the program to find the Cosine of the given angle for the user defined accuracy. This is a fast, reliable and robust program, which uses no sophisticated functions but a simple while loop and other math functions. Logic: The program follows the mathematical cosine series, where cosine of the entered radian angle ? [...]

Program to find the sum of the sine series

Thursday, December 4th, 2008  »  Posted By  »  Total 0 Comment

Here is the program to find the Sinusoidal value of the given angle for the user defined accuracy. This is a fast, reliable and robust program, which uses no built in functions but a simple while loop and other math functions. Logic: The program follows the mathematical sine series, where cosine of the entered radian [...]

To find the sum of digits

Thursday, December 4th, 2008  »  Posted By  »  Total 0 Comment

Here is the program to find the sum of the digits of the entered number. Main idea in this program is to slice down the given number into digits and to operate on them. Logic : The program asks the user to enter the number, to find out the sum of its digits. Sets the [...]

To check whether a given number is palindrome or not

Thursday, December 4th, 2008  »  Posted By  »  Total 3 Comments

This is the program to check for the ‘Palindrome’ property of the given number. Palindrome is the instinct property of any literal segment, where the segment reads the same either from left to right or vice versa. For example : 12321 andĀ  LEVELĀ  are the palindromes as they reads same if we go from right [...]

Question and Answer
C/C++ Unix & Linux Wordpress
Source codes
C C++ Java

Free email signup