#include <iostream>\n\nusing namespace std;\n\nint main()\n{\n int num, x, remainder, midrow, column, used, halfcolumn, secondhalf;\n\n cout << "Enter number of students: "; //get number of students\n cin >> num;\n\n if(num % 4 == 0) //if number of students is a multiple of 4\n {\n x = num / 4; //solve for x\n\n cout << "Number of students used is " << num << endl;\n cout << "Number of balance students is 0\\n\\n"; //All students are used to form the E in this case\n }\n else //if number of students is not a multiple of 4\n {\n remainder = num % 4; //finds number of remaining students after forming the E\n x = num / 4;\n used = 4*x; //finds number of students used to form the E\n\n cout << "Number of students used is " << used << endl;\n cout << "Number of balance students is " << remainder << endl << endl;\n }\n\n midrow = x-1; //number of students for middle row of E\n column = x+1; //number of students for column of E\n\n if(column%2 == 1)//gets half the number of students used for the column of E when there's an odd number of students there\n {\n halfcolumn = (column/2) + 1;\n secondhalf = column/2;\n }\n if(column%2 == 0)//gets half the number of students used for the column of E when there's an even number of students there\n {\n halfcolumn = (column/2);\n secondhalf = column/2;\n }\n\n for(int i=0; i<x; i++) //Outputs first row of E\n {\n cout << "*";\n }\n for (int i=0; i<halfcolumn; i++) //Outputs first half of the column of E\n {\n cout << "\\n*";\n }\n cout << endl;\n for(int i=0; i<midrow; i++) //Outputs the middle row if E\n {\n cout << "*";\n }\n for (int i=0; i<secondhalf; i++) //Outputs the second half of the column of E\n {\n cout << "\\n*";\n }\n cout << endl;\n for(int i=0; i<x; i++) //Outputs the bottom row of E\n {\n cout << "*";\n }\n cout << endl << endl;\n return 0;\n}\n

\n", "tags": [{"absolute_url": "/public/tag/e/", "id": 4746, "name": "e", "resource_uri": "/api/public/tag/4746/", "snipts": "/api/public/snipt/?tag=4746"}], "title": "forming an E", "user": {"absolute_url": "/Rajendran/", "email_md5": "904bc833621d8b8372c9397eb38d72f0", "id": 3859, "resource_uri": "/api/public/user/3859/", "snipts": "/api/public/snipt/?user=3859", "snipts_count": 26, "username": "Rajendran"}}