Click here to Skip to main content
15,919,028 members

Comments by User-15430256 (Top 3 by date)

User-15430256 7-Jan-22 10:37am View    
How do I convert a string to an int
User-15430256 16-Dec-21 3:54am View    
soory I copied the wrong code
User-15430256 16-Dec-21 3:53am View    
#include <iostream>

using namespace std;



void edge_line(int row, int length)
{
for (int col=0; col < length; ++col)
{
char c = 'a' - 32 * (col & 1);
cout << c;
}
cout << '\n';
}
void middle_line(int row, int length){
char c='b';
for ( int col =1; col <=row ; col++)
{
cout<<c<<endl;
c++;
="" }

="" for="" (int="" col="0;" <="" length;="" ++col)
="" {
="" char="" d="c-32" *(col="" &1="" )="" ;

="" cout="" <<="" c;
="" }
="" '\n';
="" cout<<endl;
="" cc="B" ;
for="" (="" int="" i="1;" ;="" i++){


="" cout<<cc<<endl;
="" cc++;
}

}

int="" main()
{

="" width="" ,length;
="" <<"please="" enter="" the="" length="" and="" of="" rctangle"<<endl;
="" cin="">> length>> width;
//uperline(width , length);
edge_line(width , length);

middle_line(width , length);
return 0;

}