Answer Posted / sharon
WAP in C to print series of odd no. upto the given num. using function and with arguments
#include<stdio.h>
#include<conio.h>
void odd(int);
void main()
{
int num;
clrscr();
printf("enter number");
scanf("%d",&num);
odd(num);
getch();
}
void odd(int num)
{
int i;
clrscr();
printf("od number upto the given numbers are");
for(i=1;i<=num;i++)
{
if(i%2!=0)
{
printf("%d\t",i);
}
}
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
Explain how many levels deep can include files be nested?
What is the auto keyword good for?
In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping
What is the purpose of the preprocessor directive error?
What is a void pointer? When is a void pointer used?
What is the difference between text and binary i/o?
What is void c?
What is spaghetti programming?
What is d'n in c?
if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above
What is union and structure in c?
Does c have function or method?
List some of the static data structures in C?
Explain is it better to bitshift a value than to multiply by 2?
my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?