hello world
This commit is contained in:
parent
4fef70020b
commit
6f85110b9b
8 changed files with 63 additions and 37 deletions
14
src/main.cpp
14
src/main.cpp
|
@ -1,14 +0,0 @@
|
|||
#include "iostream"
|
||||
#include <cstring>
|
||||
#include <cwchar>
|
||||
#include <string>
|
||||
|
||||
int main() {
|
||||
std::string msg = "hello world";
|
||||
for (int i = 0; i < msg.length(); i++) {
|
||||
std::cout << msg[i];
|
||||
if (i != msg.length() - 1 && msg[i+1] != ' ' && msg[i] != ' ')
|
||||
std::cout << '-';
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue