this is our homework...
// make a c program that will ask any number from the user.
//Output all numbers multiples of 3 from number to 30.
// make a c program that will ask any number from the user.
//Output all numbers multiples of 3 from nuber to 30.
#include<stdio.h>
int main()
{
int num = 0;
printf("Enter a number: \n");
scanf("%d",&num);
while ( num <= 30)
{
printf("%d \n", num);
num = num + 3;
}
{
if ( ( num % 3 )== 1 )
{
printf("%d \n",num);
num = (num + 2) + 2;
}
while ( ( num % 3) == 0)
{
printf("d \n", num);
num = (num + 1) + 3;
}
while ( ( num % 3 )== 2 )
{
printf("%d \n",num);
num = num + 1;
}
}
getchar();
getchar();
}
//1) Ask for integer from user.
//2) If num is less than 30 display multiples of 3.
//3) if else exit.
What should i do with this one?.,
I really need your help guys.