else
printf(“%d is bigger number.”,b);
return 0;
}
---------------------------------------------------------------------------------------------------------------------------------------
Problem#3: Find the biggest number of any three numbers.
#include<stdio.h>
int main()
{
int a,b,c;
printf(“Input first number:”);
scanf(“%d”,&a);
printf(“Input second number:”);
scanf(“%d”,&b);
printf(“Input third number:”);
scanf(“%d”,&c);
if((a>b) && (a>c))
printf(“%d is biggest number.”,a);
else if((b>a) && (b>c))
printf(“%d is biggest number.”,b);
else
printf(“%d is biggest number.”,c);
return 0;
}
---------------------------------------------------------------------------------------------------------------------------------------
Problem#4: Find if the number is positive or negative.
#include<stdio.h>
int main()
{
int a;
printf(“Input number:”);
scanf(“%d”,&a);
if(a>=0)
printf(“Positive number.”);
else
printf(“Negative number.”);
return 0;
}
---------------------------------------------------------------------------------------------------------------------------------------
Problem#5: Find if the number is odd or even.
#include<stdio.h>
int main()
{
int a;
printf(“Input number:”);
scanf(“%d”,&a);
C programming:Simple problems for beginners By SHAHRIAR
Start from the beginning
