Take FREE!! Online Mettl Mock Test to Crack TechM and Other Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
TCS NQT Technical and Managerial Round Interview Questions

Program Discussion :: Basics

Home > Programs > Basics

6 / 265

Write a program to print odd number in descending order from 1-10.

Answer:

#include
#include
void main()
{
   int i,j=2;
   for(i=10;i>=1;i--)
   {
     if(i%j==1)
     {
       printf("%d",i);
     }
   }
}

Asked In :: TCS

Post Your Answer Here:

Language:

Post Your Reply Here:



Language:

Post Your Reply Here: