Hi Guyz,
There is two questions please help out in making program.

Q)write a program using conditional operators to determine whether a year entered through the keyboard is a leap year or not.

Q)write a program to print out all Armstrong numbers between 1 and 500.if sum af cubes of digits of the number is equal to the number it self,then the number is called an Armstrong number. For example,153=(1*1*1)+(5*5*5)+(3*3*3).

Recommended Answers

All 2 Replies

Leap year : A year is a leap year if it is divisible by 4. Except if it is also divisble by 100, then it can only be a leap year if it is divisible by 400.

commented: i always love that little fact :) +5
commented: You're babying them. They can read basic definitions on wikipedia. +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.