Why is this C for-loop didn't working anymore?

Viewed 30
#include<stdio.h>

#define largevalue  11

int main(void)
{
    int num;
    int ans;
    
    
    printf("enter a number:");
    scanf_s("%d\n", &num);

    for (ans = num; ans<= num+largevalue; ans++);
    printf("%d\n", num);
    
    printf("this is the array you looking for:%d\n", ans);



    

    return 0;
}

this program only shows me the last number for example, if I enter 1 then only show me the 13 but I want an array that is like 1 2 3 4 ... 13

0 Answers
Related