Oleg Posted August 28, 2008 Report Share Posted August 28, 2008 #include <iostream>#include <cstdlib>using namespace std;int main(){ if (10 == 20) cout << "10 equals to 20" << endl; else cout << "10 equals to 10" << endl; cin.get();}How do you like the program? Do I show a certain potential as a programmer?Oops, I don't know why I included <cstdlib> in the program. I guess I wanted to have exit(0) statement in the program. Link to comment Share on other sites More sharing options...
Ultima Posted August 28, 2008 Report Share Posted August 28, 2008 This snippet doesn't display much in the way of allowing one to judge your potential... Link to comment Share on other sites More sharing options...
Oleg Posted August 28, 2008 Author Report Share Posted August 28, 2008 Yeah, I am only a beginner in C++, but it's cool! I created another meaningless program:#include <iostream>using namespace std;int num1(int num){ return num * num / 3;}int main(){ int num = 5; cout << num1(num) << endl;} I created the executable file by running this beautiful command: g++ compile1.cc -ansi -pedantic-errors Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.