I think it is very bad on your part to request more programs fro digit users...
When you haven't tried making one on your own...
This won't work dude ! Try to make some programs on your own okay ?
BTW I'm only giving the concept of each program... Try to make them on your own..
If you are unsuccesful...
Try again
And then try once more
After that you should post it over here...
If anyone gives you the programs then he is ruining your future !
###############################################
1) Simple, input two numbers, use if to compare two numbers, e.g if(a>b) , if the condition is true print a else print b.
Dude this is the simplest program. What books are you reading ??
2) Again a simple one... Input the quantity and the price... if(quantity>1000) then price = price - price*0.1 , print price
3) Input two years, if( (yearone - yeartwo) >3 ) print bonus else do nothing
###############################################
1) if (no % 2 ==0) Number is even else odd
2) if (salary < 1500) then [salary = salary + salary*10/100 + salary*90/100] else [salary = salary + 500 + salary*98/100 ]
3) input the choice and the option... For eg option 1 is for C-F and 2 is for reverse...
Then if (option==1) variable = 9*temperature/5 + 32 if (option ==2) variable =(f-32)*5/9
4) Enter a,b,c
If (b^2 - 4*a*c is less than 0) then give error coz the roots are imaginary
else
root1=(-b+sqrt(b*b-4*a*c))/(2*a)
root2=(-b-sqrt(b*b-4*a*c))/(2*a)
print the roots...
5) Palindrome is a number which on reversing is the same as the first one.
This could be a tough one for you... So here is the number reversal function
Code:
int reverse(int a)
{
int b=0,temp;
while (a!=0)
{
temp=a%10;
a=a/10;
b=(b*10)+temp;
}
return b;
}
void
This will reverse and return the number... Now all you have to do is store it in a variable and check if they are equal or not..
6) input a,b,c,d if ((c-d) >0) then print (a+b)/(c-d) else print error....