Loading...

CPP String to read a line of text

Đã đăng 4 năm trước

C++ program to read and display an entire line entered by user.

#include <iostream>
using namespace std;

int main()
{
    char str[100];
    cout << "Enter a string: ";
    cin.get(str, 100);

    cout << "You entered: " << str << endl;
    return 0;
}

LIÊN KẾT TẢI VỀ

Hashtag phổ biến
#Code x 2
#Sammy x 2