Program to display asterisks in the shape of a plus sign, C/C++ Programming

Assignment Help:

Write a program called plus that will display asterisks in the shape of a plus sign which has the height and width specified by the user. You must only allow entry of an odd number for the height. (Reuse the Java code you created for task 1.) When an odd number (n) has been entered, display a plus sign that is n asterisks tall and n asterisks wide.

Hints:

1.    Use multiple loops to create the plus shape, including nested loops

2.    Reuse the odd/even code you created in task 1

Enter Size: 10

SIZE MUST BE ODD

Enter Size: 12

SIZE MUST BE ODD

Enter Size: 15


Related Discussions:- Program to display asterisks in the shape of a plus sign

Described inline function?, A: The inline keyword tells the compiler to sub...

A: The inline keyword tells the compiler to substitute the code in the function de_nition for each instance of a function call. Though, substitution takes place only at the compile

Credit Card Validation Check digit, Use 16 digit credit card numbers that c...

Use 16 digit credit card numbers that contain 15 digits an 1 check digit. The format of the card number consists of the 15 digits followed by the check digit. The check digit is co

Recursive function, Write a recursive function recursiveMin that takes an i...

Write a recursive function recursiveMin that takes an integer array, a starting subscript and an ending subscript as arguments, and returns the smallest element in the array. The

Area under curve, Write a program to find the area under the curve y = f(x)...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Wap to print any name on screen 10 times, WAP TO PRINT ANY NAME ON SCREEN 1...

WAP TO PRINT ANY NAME ON SCREEN 10 TIMES void main () { int a=1; clrscr(); do { printf ("expertsmind\n"); a++; } while (a getch (); }

LOOP, DIFFERENCE BETWEEN WHILE AND DO WHILE LOOP?

DIFFERENCE BETWEEN WHILE AND DO WHILE LOOP?

External iterator and an internal iterator, What is the difference between ...

What is the difference between an external iterator and an internal iterator? Ans) An internal iterator is executed with member functions of the class that has items to step th

Explain difference between early binding and late binding, What is the diff...

What is the difference between early binding and late binding? What are advantages of early binding? a.) Late binding refers to function calls which aren't resolved until run t

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd