Friday, 2 May 2014

Write a program that match the value of variable “a”.e.g a=100; if value matches the print “value matches” Other wise print “Value of a is not matching Exact value of a is : 100 ”

Leave a Comment


Write a program that match the value of variable “a”.e.g a=100; if value matches the print “value matches”
Other wise print “Value of a is not matching
Exact value of a is : 100 ”

#include <iostream>                                  
#include <conio.h>

using namespace std;

int main()
{
   int value,a=100;
   cout<<"Enter value:";
   cin>>value;
   if (value==a)
   {
      cout<<"\nValue Matches";
   }
   if (value!=a)
   {
    cout<<"\nValue is not matching";
   }
getch();
}
 


If You Enjoyed This, Take 5 Seconds To Share It

0 Questions: