Please Help Me with C program: How to print this output -

wetpaint

wetpaint

@wetpaint-3rXqGx Oct 21, 2024
Our teacher will take a test after 2 days and I have a problem in C language. Please help me regarding this program.
I want to print this output

*
* * *
* * * * *
please help me any c language expert if anybody solve it then give answer here.

😕😕😕😕😕😕😕😕😕😕

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • gaurav.bhorkar

    gaurav.bhorkar

    @gauravbhorkar-Pf9kZD Oct 13, 2009

    Re: Please Help Me...

    Hi Wetpaint,

    This is a pretty simple problem. Try your hand at it and post the code here.
    The CEans are here to help you.
  • Manish Goyal

    Manish Goyal

    @manish-r2Hoep Oct 13, 2009

    here is the code ...but in c++...
    #include<iostream.h>
    int main()
    {
    for(int i=1;i<=3;i++)
    {
    for(int j=1;j<=(5*i)/3;j++)
    {
    cout<<"*";
    }
    cout<<endl;
    }
    }
  • wetpaint

    wetpaint

    @wetpaint-3rXqGx Oct 13, 2009

    Re: Please Help Me...

    gaurav.bhorkar
    Hi Wetpaint,

    This is a pretty simple problem. Try your hand at it and post the code here.
    The CEans are here to help you.
    But if its a simple problem then solve it plz.

    and in the last line how can I write it in c because I don,t know C++
    plz dear convert this program in C language. 😕😕😕
  • dipen30

    dipen30

    @dipen30-hGOPpa Oct 13, 2009

    here it is in C

    #include<stdio.h>
    int main()
    {
    int i,j;

    for(i=1;i<=3;i++)
    {
    for(j=1;j<=(5*i)/3;j++)
    {
    printf("*");
    }
    printf("\n");;
    }
    }