answersLogoWhite

0

void Decimal_to_Octal()
{
int n,r[10],i;
cout<<"Enter a number to find it's octal equivalent";
cin>>n;
cout<<"The octal equivalent of "<for(i=0;n!=0;i++)
{
r[i]=n%8;
n=n/8;
}
i--;
for(;i>=0;i--)
cout<count<}

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

How do you Write A program in c language for checking a diagonal matrix?

Write a program in c++ that take input in a integer matrix of size 4*4 and find out if the entered matrix is diagonal or not.


How convert octal to binary?

If necessary, pad the value with zeroes so the number of bits is an exact multiple of 3. Then divide the binary value into groups of 3 bits. Convert each group to its corresponding octal digit as follows: Bin = Oct 000 = 0 001 = 1 010 = 2 011 = 3 100 = 4 101 = 5 110 = 6 111 = 7 Example 1: 16-bit value: 1011101101100011 3-bit groupings: (00)1 011 101 101 100 011 Octal digits: 1 3 5 4 3 Octal value: 13543 Example 2: 24-bit value: 010111011010010101011010 3-bit groupings: 010 111 011 010 010 101 011 010 Octal digits: 2 7 3 2 2 5 3 2 Octal value: 27322532


Write a program to check whether the number is divisible by 3 or not by using the?

I assume you mean is an if the number is an integer multiple of 3i am unfamiliar with C but the theory would be,find if a is integer multiple of 3b=a/3b==round(b).if 1 "yes"else "no"this is an inefficiency way but will get the job done


How do you find repeated integer number in the array in java program?

The most simpliest way is to use a nested loop. However this runs in O(N*N) time. For small arrays, this should be sufficient.


How do you write a program to find number of zeros for the given number in c program?

Assuming the number is represented by a decimal integer, initialise a counter to zero, then repeatedly divide the number by 10 and until the number is zero. After each division, examine the remainder. Each time the remainder is zero, increment the counter. If the number is represented by a decimal float, repeatedly multiply by 10 until the value is an integer, then perform the previous algorithm.

Related Questions

Wrie a program to receive an integer and find its octal equivalant?

Use %o


How do you multiply to find an equivalent fraction?

You can multiply the numerator and the denominator of a fraction by any non-zero integer to get an equivalent fraction.


What is the excess-3 equivalent of octal 1543?

To find the Excess-3 equivalent of the octal number 1543, first convert each octal digit to its binary equivalent: 1 (001), 5 (101), 4 (100), and 3 (011). Then, convert each binary digit to its decimal form and add 3 to each digit: 1+3=4, 5+3=8, 4+3=7, and 3+3=6. Finally, convert these decimal values back to binary: 4 (100), 8 (1000), 7 (0111), and 6 (0110). Thus, the Excess-3 equivalent of octal 1543 is 100 1000 0111 0110.


How to find equivalent ratios?

Suppose you are given the ratio X/Y.To find an equivalent ration, take ANY positive integer, k. Then (k*X)/(k*Y) is an equivalent ratio.Strictly speaking, k need not be a positive integer: it need not even be a real number. All that is required is that it is not 0.


How do you find an integer?

To find an integer you ask your teacher.


What is division to find equivalent fraction of 418 math?

418 is an integer and not a fraction. So division is not going to help.


How can you use multiplication to find an equivalent fraction 1 over 3?

Multiply the numerator and the denominator by the same integer.


How do you Write A program in c language for checking a diagonal matrix?

Write a program in c++ that take input in a integer matrix of size 4*4 and find out if the entered matrix is diagonal or not.


How do you write 0.19 as an equivalent fraction?

0.19 = 19/100 as a fraction. To find other equivalent fractions you simply multiply the numerator and denominator by the same non-zero integer.


What is the equivalent ratio of 12 5?

To find the equivalent ratio of 12 to 5, you can multiply both numbers by the same non-zero integer. For example, multiplying both by 2 gives you an equivalent ratio of 24 to 10. Similarly, multiplying by 3 would yield 36 to 15. Thus, equivalent ratios can be represented as (12n) to (5n) for any integer n.


Why you can not find binary number from any octal number by dividing the octal number by 2?

I dont freakin know, use a god damned calculator, I'm not Einstein mother fu**er.


How would you scale up the ratio A boys to B girls to find equivalent ratios?

Pick any non-zero integer, n. Then A*n and B*n are an equivalent ratio.