- Oct 14, 2001
- 2,489
- 0
- 76
http://www.wvgazette.com/News/200810180251
Is it really hard to write this code or something like it?
#include <stdio.h>
#include GenVarName.h
#include iostream.h
void CountVotes()
{
String VoterSelection, InputCandidate;
global long ObamaCount, McCainCount;
getline (cin,VoterSelection);
if(strcmp(VoterSelection, "McCain")==0)
{
McCainCount++;
}
elseif(strcmp(VoterSelection, "Obama")==0)
{
ObamaCount++
}
elseif(strcmp(VoterSelection, "McCain")!=0 && strcmp(VoterSelection, "Obama")!=0)
{
cout<<"Please Type in the name of your candidate: ";
GenVarName(VoterSelection, "Count", Long, global, increment);
}
}
Is it really hard to write this code or something like it?
#include <stdio.h>
#include GenVarName.h
#include iostream.h
void CountVotes()
{
String VoterSelection, InputCandidate;
global long ObamaCount, McCainCount;
getline (cin,VoterSelection);
if(strcmp(VoterSelection, "McCain")==0)
{
McCainCount++;
}
elseif(strcmp(VoterSelection, "Obama")==0)
{
ObamaCount++
}
elseif(strcmp(VoterSelection, "McCain")!=0 && strcmp(VoterSelection, "Obama")!=0)
{
cout<<"Please Type in the name of your candidate: ";
GenVarName(VoterSelection, "Count", Long, global, increment);
}
}