---
title: "how to print 1 to 100 number using one loop with proper format?"  
description: "how to print 1 to 100 number using one loop with proper format?"  
author: "Mukul Goenka"  
published: 2021-11-11  
updated: 2021-11-11  
canonical: https://www.mindstick.com/forum/156827/how-to-print-1-to-100-number-using-one-loop-with-proper-format  
category: "c#"  
tags: ["programming language"]  
reading_time: 2 minutes  

---

# how to print 1 to 100 number using one loop with proper format?

how to [print 1 to 100](https://www.mindstick.com/forum/156826/how-to-print-1-to-100-number-without-using-any-number) number using one loop with proper [format](https://www.mindstick.com/forum/162083/how-to-convert-ost-files-into-pst-format)?

## Replies

### Reply by Ravi Vishwakarma

```
#include <stdio.h>#include <string.h>int main(){    char dummy[] =' ';    int start = strlen(dummy);    int end = (int)'d';    int pv = start;    for(int i = start; i<=end; i+=10){                if(i>(end - 10) && i<=end)        {            printf('%4d',pv);            pv = ++start;            i = pv;            printf('\n');        }        if(start > 10)            break;        printf('%4d',pv);            pv +=10;     }    return 0;}
```

Output

```
   1  11  21  31  41  51  61  71  81  91
   2  12  22  32  42  52  62  72  82  92
   3  13  23  33  43  53  63  73  83  93
   4  14  24  34  44  54  64  74  84  94
   5  15  25  35  45  55  65  75  85  95
   6  16  26  36  46  56  66  76  86  96
   7  17  27  37  47  57  67  77  87  97
   8  18  28  38  48  58  68  78  88  98
   9  19  29  39  49  59  69  79  89  99
  10  20  30  40  50  60  70  80  90 100
```


---

Original Source: https://www.mindstick.com/forum/156827/how-to-print-1-to-100-number-using-one-loop-with-proper-format

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
