write a program for odd numbers?

Answers were Sorted based on User's Feedback



write a program for odd numbers?..

Answer / chintu gandhi

main()
{
int i,n;
clrscr();
printf("\nenter range up to which u want to print");
scanf("%d",&n);
for(i=1;i<n;i=i+2)
{
printf("\n%d",i);
}
getch();
}

Is This Answer Correct ?    75 Yes 33 No

write a program for odd numbers?..

Answer / pratikjis@yahoo.com

#include "stdio.h"
#include "conio.h"

void main()
{
int i;
clrscr();
printf("Enter the number");
scanf("%d", &i);
if(i%2==0)
{
printf("the number is even %d", i);
}
else
{
printf("The number is odd %d", i);
}
getch();
}

Is This Answer Correct ?    36 Yes 19 No

write a program for odd numbers?..

Answer / narendra

#include<stdio.h>
#include<conio.h>
void main()
{
int num;
clrscr();
printf("enter ur range:");
scanf("%d",&num);
for(i=1;i<=num;i+2)
printf("%d",num);
getch();
}

Is This Answer Correct ?    27 Yes 19 No

write a program for odd numbers?..

Answer / keerthana

#include<stdio.h>
void main()
{
int n,i;
scanf("%d",&n);
for(i=0;i<=n;i++)
{
if(n%2)!=0)
printf("Odd numbers",n);
}
}

Is This Answer Correct ?    11 Yes 3 No

write a program for odd numbers?..

Answer / lakhan patidar

#include<stdio.h>
#include<conio.h>
void main()
{
int num;
clrscr();
printf("enter ur range:");
scanf("%d",&num);
for(i=1;i<=num;i+2)
printf("%d",num);
getch();
}

Is This Answer Correct ?    16 Yes 12 No

write a program for odd numbers?..

Answer / sreeshma

#include<stdio.h>
main()
{
int i,n;
printf("enter a range of numbers");
scanf("%d",&n);
for(i=0;i<=n;i+2)
{
printf("%d",i);
}
break;
getch();

Is This Answer Correct ?    9 Yes 5 No

write a program for odd numbers?..

Answer / aswani

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("enter the two numbers");
scanf("%d %d ",&a,&b);
c=a+b;
printf("%d sum is",c);
getch();
}

Is This Answer Correct ?    3 Yes 1 No

write a program for odd numbers?..

Answer / roopali

#include<stdio.h>
void main()
{
int i;
clrscr();
printf("\n odd numbers?");
scanf("%d",&n);
for(i=0;i<=n;i++)
print i=i+1;
printf("\n %d",i);
getch();
}

Is This Answer Correct ?    4 Yes 4 No

write a program for odd numbers?..

Answer / mahendiran

#include<stdio.h>
#include<conio.h>
void main()
{
int i;
clrscr();
printf("Enter the number");
scanf("%d", &i);
if(i%2==0)
{
printf("the number is even %d", i);
}
else
{
printf("The number is odd %d", i);
}
getch();
}

Is This Answer Correct ?    1 Yes 1 No

write a program for odd numbers?..

Answer / vivek singh

#include<stdio.h>
#include<conio.h>
void main()
{
int num;
printf("Enter the number:");
scanf("%d",&num);
if(num%2==0)
{
printf("Number is Even");
}
else
{
printf("Number is Odd");
}
getch();
}

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More C Interview Questions

Can i use Two or More Main Funtion in any C program.?

4 Answers  


WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER

0 Answers  


Can include files be nested?

0 Answers  


Is flag a keyword in c?

0 Answers  


#include<stdio.h> int main( ) { Int a=300, b, c; if(a>=400) b=300; c=200; printf(“%d%d ”, b, c); return0; }

1 Answers  






though sbi was nationalized why its not comes under nationalized banks and its comes under publicsector banks

3 Answers   State Bank Of India SBI,


where do we use volatile keyword?

1 Answers  


Which of the following data structures is on average the fastest for retrieving data: 1) Binary Tree 2) Hash Table 3) Stack

3 Answers  


What is calloc malloc realloc in c?

0 Answers  


how do u find out the number of 1's in the binary representation of a decimal number without converting it into binary(i mean without dividing by 2 and finding out the remainder)? three lines of c code s there it seems...can anyone help

5 Answers  


What is graph in c?

0 Answers  


What are .h files and what should I put in them?

3 Answers  


Categories