No experience with menus and calling functions... HELP
I just finished my assigned programs that each draws a simple shape with the users desired character.
Now I have to make a menu based on 6 printf's which lets the user pick which figure to draw and if he/she wants to exit. The menu has to be based on calling each drawing program as a function. The programs are already in function form but I have programmers blockage in terms of what to do after the users picks a selection from 1 to 6. The 6th printf is for the user to exit the program/menu.
Code:
#include <stdio.h>
#include <stdlib.h>
int main ()
{ int option, x, y, num, size;
// x y num and size are variables from each of the programs//
char symbol;
char c;
void cuadrado (int, char);
printf ("1. Draw a square");
printf ("2. Draw a Diamond");
printf ("3. Draw a triangle left justified");
printf ("4. Draw a triangle right justified");
printf ("5. Draw an hour glass");
printf ("6. Exit");
scanf ("%d", &option);
Basically I know that for each option I have to call the appropiate function, such as
But also each figure requires that the user input the size of the figure(rows, columns etc.) and what character they want the figure to be drawn in. I just don't know where to start... But the general order would be foir the user to input his selection, then to be asked a number between 1-20 and then to be asked the character they want for all the figures.
Any help no matter how minute will be gratly appreciated.