CONVERSION OF FAREHNITE TO CENTIGRADE USING C PROGRAM









#include<stdio.h>
int main(){
  long int no,n=0,j=1,rem,no1;
  printf("Enter any number any binary form->");
  scanf("%ld",&no);
  no1=no;
  while(no!=0){
      rem=no%10;
      n=n+rem*j;
      j=j*2;
      no=no/10;
  }
  printf("\nThe value of binary no. %ld is ->%ld",no1,n);
  return 0;
}




Alogrithm:
**






1. Write a c program to convert decimal number to hexadecimal number.
3. Write a c program to convert octal number to decimal number.
4. Write a c program to convert octal number to hexadecimal number.
5. Write a c program to convert hexadecimal number to decimal number.
6. Write a c program to convert hexadecimal number to octal number.
8. Write a c program to convert binary number to hexadecimal number.
9. Write a c program to convert binary number to octal number.
11. Write a c program to convert hexadecimal number to binary number.
12. Write a c program to convert octal number to binary number.
14. Write a c program to convert centigrade to fahrenheit.


2 comments:

Anonymous said...

it for binary to decimal

anis said...

its nt the r8 soln for temperature conversion