/* WAP to Print the age of person in days */
#include<stdio.h>
#include<conio.h>
main()
{
int age,days;
printf("Enter your age:");
scanf("%d",&age);
days=age*365;
printf("You are %d days old.\n",days);
getch();
}
/* WAP to Print the age of person in days */
#include<stdio.h>
#include<conio.h>
main()
{
int age,days;
printf("Enter your age:");
scanf("%d",&age);
days=age*365;
printf("You are %d days old.\n",days);
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int num,temp,rem,sum=0;
printf("Enter a number:");
scanf("%d",&num);
temp=num;
while(temp!=0)
{
rem=temp%10;
sum=sum+(rem*rem*rem);
temp=temp/10;
}
if(sum==num)
printf("\n%d is an Armstrong Number.",num);
else
printf("\n%d is not an Armstrong Number.",num);
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int dec,temp,bin[100],i=1,j;
printf("Enter A Decimal Number:");
scanf("%d",&dec);
temp=dec;
while(temp!=0)
{
bin[i++]=temp%2;
temp=temp/2;
}
printf("The Equivalent Binary Number Of %d is ",dec);
for(j=i-1;j>0;j--)
{
printf("%d",bin[j]);
}
getch();
}