CSharp examples for Language Basics:Operator
Mix increment operator and normal operator
using System;//from w ww . ja v a2s . c o m class Library { public static void Main() { int numProgrammingBooks = 2; int numStatisticsBooks = 1; int numActionBooks = 504; int totalBooks; totalBooks = ++numActionBooks + numProgrammingBooks + numStatisticsBooks; Console.WriteLine("Number of action books: " + numActionBooks); Console.WriteLine("Total number of books: " + totalBooks); } }