How to use expression in maximum bounds in for loop with C#

1 Answer

0 votes
using System;

namespace ConsoleApplication_C_Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            for (int i = 0; i < (30 / 2); i += 2) {
                Console.WriteLine(i);
            }
        }
    }
}


/*
run:
   
0
2
4
6
8
10
12
14
 
*/

 



answered Aug 19, 2018 by avibootz

Related questions

1 answer 259 views
1 answer 138 views
1 answer 108 views
108 views asked Mar 6, 2023 by avibootz
1 answer 170 views
1 answer 137 views
137 views asked Nov 23, 2020 by avibootz
1 answer 178 views
178 views asked May 10, 2019 by avibootz
...