how do i do this program?
Write a program that uses nested loops to produce the following output.
A1B1B2B3A2B1B2B3
some help with code would be good.
how do i do this program?
Write a program that uses nested loops to produce the following output.
A1B1B2B3A2B1B2B3
some help with code would be good.
If looks like you are being asked to print out A1, then B1, B2 and B3
then start the A loop again with A2, and go through the B loop again and print out B1, B2 and B3 again.
Hint:
print out a letter then the current count.
2 loops will be nested
Way to ask for someone to do your homework for you, but seeing as how I'm bored, I'll do it anyways.
#include <stdio.h>
int main(void)
{
int a, b;
for (a=1;a<3;a++)
{
printf("A%d",a);
for (b=1;b<4;b++)
prtintf("B%d",b);
}
}
-Max
[email protected]