Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
378 B
2
Indexable
Never
int main()
{
    float a = 50;
    float b = 1000;
    int n1 = 100;
    int n2 = 2000;
    int v1 = 0;
    int v2 = 1;
    float step = a/n1;
    int j = 0;
    int i = 0;
    while ( i <= n2 ){
        i++;
        j++;
        printf("%f %f %d %d \n", i * step, j * step, v1 ,v2);
        if (j == n1){
            j = 0;
        }

    }
    return 0;
}