Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #72.8K
2 Posted Topics
Re: #include <iostream> #include <string> using namespace std; int main() { string str, str0="", str1=""; cin >> str; for(int i=0; i<str.size(); ++i){ if(str[i] == '0') str0 += str[i]; else str1 += str[i]; } cout << str0 + str1 << endl; } | |
Re: #include <iostream> #include <string> #include <fstream> using namespace std; int main(){ string str; int tmp; double sum = 0; ifstream ifs("file.txt"); while(ifs>>str>>tmp){ cout << str << ' ' << tmp << endl; sum += tmp; } cout << "Average Temperature:" << sum/7 << endl; } |
The End.