online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
using System; namespace SpinMe { class SpinMeProgram { static void Main(string[] args) { int sum = 0; int count_spin = 0; int count_me = 0; int count_spinme = 0; int count_360 = 0; //Print the numbers 1 to 100, each on a new line for (int num=1; num <= 100; num++) { //For multiples of both 3 and 5, print “SpinMe” instead of the number if (num % 3 == 0 && num % 5 == 0) { Console.WriteLine("SpinMe"); sum = sum + num; count_spinme++; } //For multiples of 3 print “Me” instead of the number else if (num % 3 == 0) { Console.WriteLine("Me"); sum = sum + num; count_me++; } //For multiples of five print “Spin” instead of the number else if (num % 5 == 0) { Console.WriteLine("Spin"); sum = sum + num; count_spin++; } //For multiples of 7, print "360" only else if (num % 7 == 0) { Console.WriteLine("360"); sum = sum + num; count_360++; } else { Console.WriteLine(num); } } Console.WriteLine("\nNumber of times Spin printed: " + count_spin); Console.WriteLine("Number of times Me printed: " + count_me); Console.WriteLine("Number of times SpinMe printed: " + count_spinme); Console.WriteLine("Number of times 360 printed: " + count_360); Console.WriteLine("Number of times digits printed: " + (100 - (count_spin + count_me + count_spinme + count_360))); Console.WriteLine("The sum of all the numbers between 1 and 100 for which \"Spin\", \"Me\", \"SpinMe\" or \"360\" were printed: " + sum); } } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue