1.

Write a code to display the series from 1 till the number entered by the user using while loop​

Answer»

Code in C language#include int main(){    int number,count = 1;      PRINTF("Enter a POSITIVE number\n");      SCANF("%d", &number);      printf("NUMBERS from %d to %d:\n",count,number);      while(count <= number)      {          printf("%d  ",count);          count++;      }      printf("\n");      return 0;  }



Discussion

No Comment Found