-->
  • Program cin dengan strings























    kali ini masbro rezky akan memposting contoh program umpan balik pake fungsi cin dan strings dan mengcompile nya melalui devC++ ...

    // cin with strings

    #include <iostream>
    using namespace std; 
     int main () 
    {
     char mybuffer [100]; 
     cout << "What's your name? "; 
     cin.getline (mybuffer,100); 
     cout << "Hello " << mybuffer << ".\n";
     cout << "Which is your favourite team? "; 
     cin.getline (mybuffer,100); 
     cout << "I like " << mybuffer << " too.\n";
     system("pause");
     }

    -Semoga bermanfaat http://masbronotes.blogspot.com

  • You might also like

    No comments: