Q:

Write program to display number 1 to 10 in octal, decimal and hexadecimal system

1

Write program to display number 1 to 10 in octal, decimal and hexadecimal system

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Program:

#include<stdio.h>
#include<conio.h>
void main()
{
int I;
clrscr();
printf(“\n This program is to print 1 to 10 numbers in different number system.\n\n”);
printf(“\n |---------------------------------|--------------------------- |---------------------------------------|”);
printf(“\n | Decimal number system|octal number system|hexadecimal number system|”);
for(i=1;i<=10;i++)
{
printf(“\n|           %d               |              %o                  |            %x                |”,i,I,i);
}
printf(“\n|------------------------|----------------------------|-------------------------|”);
getch();
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C Programming Exercises With Solutions

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
write program to generate following pattern... >>
<< Write a program in c to type casting implicit expl...