answersLogoWhite

0


Best Answer

Use %o

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Prince Roy

Lvl 2
3y ago

C language

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Wrie a program to receive an integer and find its octal equivalant?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write a Java program to convert a decimal number to an octal number?

public class Dataconversion { public static void main(String[] args) { System.out.println("Data types conversion example!"); int in = 44; System.out.println("Integer: " + in); //integer to binary String by = Integer.toBinaryString(in); System.out.println("Byte: " + by); //integer to hexadecimal String hex = Integer.toHexString(in); System.out.println("Hexa decimal: " + hex); //integer to octal String oct = Integer.toOctalString(in); System.out.println("Octal: " + oct); } }


Why you use percent o in C programming?

An integer in octal, for example 25 decimal is 031 octal. (Octal numbers are traditionally preceded by a 0).


What is a program to accept a 3 digit integer and display its octal conversion value?

public class PrintOctal { public static void main(String[] args) { int n = Integer.parseInt(args[0]); System.out.printf("%o\n", n); } }


How many types of integer constants are allowed in java.how are they written?

3 types.. 1.decimal base 10 octal base 8 hexadecimal base 16


What is 128 in octal?

128 in octal is 200.


What is the octal of hex 54?

Octal 124


What is 262 in octal as a decimal number'?

262 octal is178 decimal.262 decimal is406 octal


What is the c program to find the octal equivalent of an integer?

void Decimal_to_Octal(){int n,r[10],i;coutn;cout


How when and whom was octal invented?

by whom octal is invented


Octal equivalent for space?

In octal notation, the ASCII code for a space is 040. So, the octal equivalent for a space is simply 040.


FD2 convart to octal?

FD2 (hexadecimal) = 7722 (octal)


What are octal digits?

a digit from 0 to 7 in octal notation.