This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
//Hello World. | |
int main() | |
{ | |
cout<<"hello world!"<<endl; | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
#include <iostream> | |
#include <string> | |
#include <map> | |
using namespace std; | |
//Percent-encode a string of characters. | |
int main() | |
{ | |
//ifstream cin("the_seven_percent_solution.txt"); | |
map<char,char> m; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
#include <iostream> | |
#include <sstream> | |
using namespace std; | |
//Summing the digits of the integer. | |
int main() | |
{ | |
//ifstream cin("digital_roots.txt"); | |
string s; | |
while(cin >> s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
//Make all stacks the same height within the minimum moves. | |
int main() | |
{ | |
//ifstream cin("box_of_bricks.txt"); | |
int n; | |
int index=1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
#include <iostream> | |
#include <cmath> | |
using namespace std; | |
//Computing the length of the third side in a right-angled triangle. | |
int main() | |
{ | |
//ifstream cin("geometry_made_simple.txt"); | |
int a,b,c; | |
int index=0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
//Reverse the text. | |
int main() | |
{ | |
//ifstream cin("reverse_text.txt"); | |
int n; | |
int index=1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
#include <iostream> | |
#include <sstream> | |
#include <string> | |
#include <algorithm> | |
using namespace std; | |
//Output a line with each word reversed without changing the order of the words. | |
int main() | |
{ | |
//ifstream cin("word_reversal.txt"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
#include <iostream> | |
using namespace std; | |
//Calculate the difference between this temperature and the previous one. | |
int main() | |
{ | |
//ifstream cin("a_simple_question_of_chemistry.txt"); | |
double a,b; | |
cin>>a; | |
while(cin>>b) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
#include <iostream> | |
#include <algorithm> | |
#include <sstream> | |
using namespace std; | |
//Reverse two numbers and add then reverse the sum. | |
int main() | |
{ | |
//ifstream cin("adding_reversed_numbers.txt"); | |
int n; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
#include <iostream> | |
using namespace std; | |
//Transform a RGB image into gray. | |
int main() | |
{ | |
//ifstream cin("image_transformation.txt"); | |
int x,y; | |
int index=1; | |
while(cin>>x>>y) |
OlderNewer