Ad Code

Responsive Advertisement

1143 - Squared and Cubic

Author: Ismail Hosen

Daffodil International University





Problem Link

//Please follow from main function

#include<stdio.h>

int main()

{

    int i,n,m,o;

    scanf("%d", &n);

    for(i=1; i<=n; i++)

    {

        m=i*i;

        o=i*m;

        printf("%d %d %d\n", i, m, o);

    }

    return 0;

}




Post a Comment

0 Comments