This blog consists of C and C++ programs. C and C++ programming is the basics to learn any programming language. Most of the programs are provided with their respective outputs. This blog also contains Data Structures programs using Object-Oriented Programming (C++). Some of the best books for learning C and C++ programming are also mentioned.

Friday 1 November 2013

C program for Relational Operators

C program for Relational Operators:

#include<stdio.h>
#include<conio.h>
main()
{
int a=10, b=4;
clrscr();
printf("\n(%d>%d) = %d",a,b,a>b);
printf("\n(%d<%d) = %d",a,b,a<b);
printf("\n(%d>=%d) = %d",a,b,a>=b);
printf("\n(%d<=%d) = %d",a,b,a<=b);
printf("\n(%d==%d) = %d",a,b,a==b);
printf("\n(%d!=%d) = %d",a,b,a!=b);
getch();
}

No comments:

Post a Comment