hi. i am having a problem using the void function to put a box around the results and display the results. here is the code i made:
Code:
#include <stdio.h>
void display_results(int, int, int);
int main()
{
int die1, die2, die3;
die1 = 1+6;
die2 = 3+4;
die3 = 2+8;
display_results();
return 0;
}
void display_results(int die1, int die2, int die3){
printf("+-------------------------------------+\n");
printf("| Die 1 | | Die 2 |\n");
printf("| %d | %d | %d |\n", die1, die3, die2);
printf("+-------------------------------------+\n");
}
the output should be
Code:
+-------------------------------------+
| Die 1 | | Die 2 |
| 7 | 10 | 7 |
+-------------------------------------+
thanks for any help