Tuesday, March 1, 2016

Printing 1-10 in C

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#include <stdio.h>

int main(){
 int i;
 for(i=1; i<=10;){
  printf("%d\t",i);
  i++;
  
 }
}

No comments:

Post a Comment

Thank you for commenting. Please wait for response :)