trygvebw
public cpp v1 · immutable#include <iostream>using namespace std;char hamlet[50];class sentences{int hello(){ cout << "Goodbye,\n"; cout << "cruel world!\n";};int goodbye(){ cout << "Hello,\n"; cout << "world!\n";};};int main(){ cout << "Are you a positive or a negative person?\n>" cin.get(hamlet); if(hamlet == "negative") { sentences::goodbye(); } else if(hamlet == "positive") { sentences::hello(); }; };