#include<iostream
>
#include<conio.h
>
#include<math.h
>
using namespace std;
int Decimal_to_Octal(long n)
{
int octal_number = 0, i = 1, remainder;
while(n!=0)
{
remainder = n%8;
n = n/10;
octal_number = octal_number + (remainder*i);
i = i*10;
}
return octal_number;
}
int main()
{
long num;
cout<<"Enter a decimal number : ";
cin>>num;
cout<<"Decimal Number "<<num
<<" is equal to "<<Decimal_to_Octal(num)
<<" Octal Number."<<endl;
getch();
return 0;
}
Sunday, 22 October 2017
Program to Convert Decimal Number to Octal Number in c++
Subscribe to:
Post Comments (Atom)
Python Program to find Fabonacci
fabtab={} def fabonacci(n): fabtab[0]=0 fabtab[1]=1 for i in range(2,n+1): fabtab[i]=fabtab[i-1]+fabtab[i-2] ...

-
#include stdio.h > #include stdlib.h > #include conio.h > int arr[100], size=0; void insert_beg(); void insert_pos(); void inser...
-
input_string=input("Enter a string : ") output_string=input_string[::-1] print("Reverse of string ",input_string,...
-
#include< iostream > #include< conio.h > using namespace std; int main() { int base, height; float area...
The best no deposit casinos 2021 - Riders Casino
ReplyDeleteTop 5 no deposit casino sites. Slots for free at most 카지노 casinos ✓ Best no deposit bonuses ✓ Newest no deposit bonuses 카지노사이트 ✓ Best no deposit bonuses for 2021. bet365