Write a program that take 2 number from user a and b. if a ( first number ) is odd , then print the next two number of b ( second number).
Write a program that take 2 number from user a and b. if a ( first number ) is odd , then print the next two number of b ( second number).
x
#include<stdio.h>
main()
{
int a,b;
printf("enter a number");
scanf("%d%d",&a,&b);
if (a%2!=0)
{
printf("number is odd");
printf(" \n next number is %d",b+1);
printf(" \n next number is %d",b+2);
}
else
{
printf("number is not odd");
}
}
Comments
Post a Comment