Thursday 31 January 2013

ternary operator in c++ by Zafar iqbal lavi

#include<iostream.h>
#include<conio.h>
void main()
{
int n;
cout<<"enter an integer"<<endl;
cin>>n;

(n>19?cout<<"greater":cout<<"smaller");

getch();
}

0 comments:

Post a Comment