Please help me. I have a problem with this program.

what will be the code of the following output?

3
6 9
12 15 18
21 24 27 30

Recommended Answers

try this code:

#include <stdio.h>

int main(){
    int i=0;
    int j=0;
    int value=0;
    for (i=0; i<5; i++){
        for (j=0; j<i; j++){
            value = value + 3;
            printf("%d\t",value);
        }
        printf("\n");
    }
}
Jump to Post

All 2 Replies

please help me as soon as posible. please

try this code:

#include <stdio.h>

int main(){
    int i=0;
    int j=0;
    int value=0;
    for (i=0; i<5; i++){
        for (j=0; j<i; j++){
            value = value + 3;
            printf("%d\t",value);
        }
        printf("\n");
    }
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.