Hello everyone!:) i need your help again..i got there a code of a while loop program and our prof let us convert it into functions. can anyone help me please. It must be converted into 3 types.
1. void only
2. void but with parameter
3. w/out void but with return value
Here's the code:
1 #include <stdio.h>
2 #include <iostream.h>
3 #include <conio.h>
4
5 int main(void)
6
7 {
8
9 int i, j;
10 i=0;
11 while (i<=4) {
12 j=0;
13 while (j<=4) {
14 j++;
15 }
16 i++;
17 }
18 i++;
19 printf("%d", i*j);
20
21 return 0;
22 }
I run this program already and the output is 30. I really appreciate your help everyone. Thank you very much
1. void only
2. void but with parameter
3. w/out void but with return value
Here's the code:
1 #include <stdio.h>
2 #include <iostream.h>
3 #include <conio.h>
4
5 int main(void)
6
7 {
8
9 int i, j;
10 i=0;
11 while (i<=4) {
12 j=0;
13 while (j<=4) {
14 j++;
15 }
16 i++;
17 }
18 i++;
19 printf("%d", i*j);
20
21 return 0;
22 }
I run this program already and the output is 30. I really appreciate your help everyone. Thank you very much
Comment