Commit Graph

19 Commits (8684e1c7470bc7298042b5705962fbb0076b09b9)

Author SHA1 Message Date
Ankit Mathur 52e288423f Correcting grammatical errors. (#33528)
* Correcting grammatical errors in syntax section.
2018-12-17 12:39:20 -07:00
Parul-Seth b1f8474ed1 add text (#31948)
nested for loop
2018-12-17 11:52:45 -07:00
richard937 406e5f8220 I have added a 'Note' part (#31868)
The note part explains where we can use 'for' loop without using curly braces.
2018-12-17 11:08:27 -07:00
shadmantaqi 6750091708 add return 0; in example (#31008) 2018-12-17 10:33:30 -07:00
AKASH JAIN 4fc41ac133 Leaving Parts Blank in a for loop. (#30479) 2018-12-17 10:06:38 -07:00
Juan D Frias 6d97b7e795 Fixed formatting, expanded text and corrected code output (#30111) 2018-12-17 09:51:53 -07:00
Máté Szőnyi 0e92f98997 Added a note for the example (#29878)
When I started learning programming for a good amount of time I couldn't understand why did we start the loop from 0 to print out values of an array, because I didn't know the "arrays are indexed from 0" rule back then. I thought this could be helpful
2018-12-17 09:34:47 -07:00
Aathil Ahamed 4c69838a20 Added introduction to index.md (#28478)
I've add more and brief information about for loop and I briefly explained the function.
2018-12-17 09:21:24 -07:00
ishan-sriv d03e742a85 Add lines 45-57 (infinite loop) to the article (#27051) 2018-12-17 09:04:37 -07:00
kavyasreek9 19ef5250e6 Updated index.md (#26819)
* Updated index.md

Included description and examples of break and continue statements using for loop.

* fix: formatting
2018-12-17 08:45:37 -07:00
apurv22 917f09aef2 Corrected grammar; changed 'are' to 'is' (#25030) 2018-12-11 13:32:23 +05:30
kenbhatt bc65ccf919 My change is in line 18. (#23604)
Initialize----->start value
Condition---->stop value
Termination----->step value
2018-12-07 04:09:16 -05:00
Krinjih e5a531682f Added a warning to the article (#22219)
* Added a warning to the article

Added a warning with an example, which can occur on older compilers.

* fix(guide): c for loop iterator misnomer

declaration not initialisation
2018-11-18 18:56:43 -07:00
katiepillar6 c90dfd2f81 Return 0 (#21561)
Added return 0 statement to the end of the code, to ensure a properly compiling program.
2018-11-14 08:14:44 -07:00
Prashant Chand 5a99e02a87 Add the syntax "For infinite loop " (#21382)
* Add the syntax "For infinite loop "

* Shifted additions around to be less confusing
2018-11-13 19:24:02 -07:00
Miftah Mizwar 9e5b352a86 Update wrong output of the example of code (#22530) 2018-11-13 21:07:32 -05:00
rajranjan0608 1024b3f039 Update index.md (#20355) 2018-10-29 12:52:43 -07:00
Siddharth Shrivastav c8aa2a4e9e star pattern using for loop (#20222)
## Example for printing star pattern for pyramid 
```c

#include<stdio.h>
int
main ()
{
  int i, j;
  for (i = 1; i <= 5; i++)
    {

      for (j = i; j < 5; j++)
	{
	  printf (" ");
	}


      for (j = 1; j <= (2 * i - 1); j++)
	{
	  printf ("*");
	}


      printf ("\n");
    }

  return 0;
}
```
## Output:
```shell 
     *
    ***
   *****
  *******
 ********* 

``
2018-10-28 15:06:09 -07:00
Mrugesh Mohapatra da0df12ab7 fix(guide): simplify directory structure 2018-10-16 21:32:40 +05:30