Friday, August 31, 2018

C++ : ' string ' Data type

#include<iostream>
#include<string>
using namespace std;
int main(){
string arr[3][3] = {"Blue", "Red", "Orange", "night","ok","that","is","good","bye"};

for(int i=0;i<3;i++)
{

    for(int j=0;j<3;j++)
    {

        cout<< arr[i][j]<<" "<<i<<" "<<j<<endl;
       
    }

}
return 1;
}


No comments:

Post a Comment

How can I run a C++ program directly from Windows?

How-can-I-run-a-C-program-directly-from-Windows