List of all available Websheets
Viewing cpp/nestedloops/rectangle by redekopp@usc.edu. You have unsaved changes. Log in above to create, edit, preview and publish Websheets.
Property | Value |
---|---|
Description html markup shown to student | <p>Write a program to output an <tt>n</tt> row by <tt>m</tt> column rectangle.</p> <p>The user will type in the value of <tt>n</tt> x <tt>m</tt> (which are integers)</p> <p>If the user types <tt>3 5</tt> your program should output:</p> <pre> ***** ***** ***** </pre> |
Public permissions | |
Remarks Comments, history, license, etc. | Copied from problem cpp/nestedloops/etox-range (author: redekopp@usc.edu) Copied from problem cpp/for/sum-mult-2-5 (author: redekopp@usc.edu) Copied from problem cpp/for/blastoff (author: redekopp@usc.edu) Copied from problem cpp/while/blastoff (author: redekopp@usc.edu) Copied from problem cpp/while/goldilocks (author: redekopp@usc.edu) Copied from problem cpp/while/sum50 (author: redekopp@usc.edu) Copied from problem cpp/conditionals/rps (author: redekopp@usc.edu) Copied from problem cpp/conditionals/taxbrackets (author: redekopp@usc.edu) Copied from problem cpp/conditionals/nestedec (author: redekopp@usc.edu) Copied from problem cpp/conditionals/extracredit (author: redekopp@usc.edu) Copied from problem cpp/control/flag (author: daveagp@gmail.com) |
Engine | |
Template / Reference solution |
using namespace std; int main() { int n, m; cin >> n >> m; \[ for(int i=0; i < n; i++){ for(int j=0; j < m; j++){ cout << "*"; } cout << endl; } ]\ } |
C++ test suite json list of stdin/args tests e.g. [{"stdin":"hi", "args":["4", "5"]}, {"stdin":"noargs"}] to just run once with no input use [{}] | [ {"stdin": "3 5", "args": ""}, {"stdin": "8 3", "args": ""}, {"stdin": "10 10", "args": ""} ] |
Solution visibility |
Note: problems are open-source by default (see 'Public permissions'). Assumed license for open problems is Creative Commons 4.0 Attribution-ShareAlike unless specified in 'Remarks'.