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]; [...]
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 [...]
This program accepts ten numbers from the user and displays the largest one,
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 [...]
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 [...]
OUTPUT:
enter frame:
1 0 1 1 0 1 0 0
enter generator:
1 0 1 0
remainder is:
0 0 1 0
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 ? [...]
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 [...]
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 [...]
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 [...]
This is the one stop educational site for all Electronic and Computer students. If you want to learn something new then we are here to help. We work on Microcontroller projects, Basic Electronics, Digital electronics, Computer projects and also in basic c/c++ programs.
#Home #Sitemap #Submit #Terms of Use
Copyright©2011 electrofriends.com All Rights Reserved
Contact:info@electrofriends.com | Powered by Dhyeya