I need to create a program that has (at least) two variables, char and num. I need to use nested loops to print char, a character, in the form of the following pattern on as many lines and as many times as specified by num. For example, if char is “M” and num is 5, then the program will draw the following pattern:

M
MM
MMM
MMMM
MMMMM

To create a program that prints a pattern using nested loops, you can follow these steps:

1. Start by defining the two variables 'char' and 'num' as specified in the question. For example, 'char' can be defined as a character variable ('char c = 'M';') and 'num' can be defined as an integer variable ('int num = 5;').

2. Next, you need to create two nested loops. The outer loop will iterate 'num' times to control the number of lines, and the inner loop will iterate based on the current line number to control the number of characters printed on each line.

3. Initialize a string variable called 'pattern' as an empty string.

4. Inside the outer loop, concatenate 'char' to the 'pattern' variable multiple times equal to the current line number using the inner loop.

5. Print the 'pattern' variable after each iteration of the outer loop.

Here's an example implementation in Python:

```python
char = 'M'
num = 5

for i in range(1, num+1): # outer loop for lines
pattern = ''
for j in range(i): # inner loop for characters on each line
pattern += char
print(pattern)
```

This program will produce the desired pattern:

```
M
MM
MMM
MMMM
MMMMM
```

You can modify the 'char' and 'num' variables as per your requirements to create different patterns.