#include <stdio.h>
int getnext(int a){ //a=0~9
    return (a*2+1);  //1, 3, 5, 7 ... 19
}
void main(){
    int i, j, k=0;
    for(i=1; i<10; i++)  //i=0~9
        for(j=1; j<getnext(i); j++) //0, 2, 4, 6 ... 18
            k++; //2+4+6+8+10+12+14+16+18 = 90
    printf("k = %d\n", k);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: