• This project
    • Loading...
  • Sign in

정대욱 / Assignment2and3

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • Assignment2and3
  • echo.cpp
  • 정대욱's avatar
    exit · 54f49520
    54f49520 Browse Files
    정대욱 authored 2019-10-04 21:02:39 +0900
echo.cpp 303 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include <iostream>
#include <cstring>

int main() {
    char buffer[256];

    std::cout << "Hello! Please enter some text:\n>> ";
    while (std::cin >> buffer) {
		if (strcmp(buffer, "exit") == 0)
			break;

        std::cout << buffer << std::endl;
        std::cout << ">> ";
    }

    return 0;
}