#include "stdafx.h"
#include <iostream>
#include <iomanip>
#include <cstring>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
char s1 = "";
char s2 = "";
cout << "Input String1: " ;
cin >> *s1;
cout << "Input String2: " ;
cin >> *s2;
if ( strcmp( s1, s2 ) > 0 )
cout << "\nThe first string is greater than the second string." << endl;
else if ( strcmp( s1, s2 ) == 0 )
cout << "\nThe first string is equal to the second string." << endl;
else if ( strcmp( s1, s2 ) < 0 )
cout << "\nThe first string is less than the second string." <<endl;
return 0;
}
san gabriel 0 Newbie Poster
vmanes 1,165 Posting Virtuoso
san gabriel 0 Newbie Poster
vmanes 1,165 Posting Virtuoso
ArkM 1,090 Postaholic
mirfan00 -19 Light Poster
tux4life commented: You're long enough on this forum to know that you should post using code tags! -2
tux4life 2,072 Postaholic
Dave Sinkula 2,398 long time no c Team Colleague
tux4life commented: Yes, you're right, I was wrong :$ +8
siddhant3s 1,429 Practically a Posting Shark
csurfer 422 Posting Pro
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
csurfer 422 Posting Pro
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
mirfan00 -19 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.