"Write a C# program that prints numbers from 1 to 100. But for multiples of 3 print “Fizz” instead of the number and for the multiples of 5 print “Buzz”. For numbers which are multiples of both 3 and 5  print “FizzBuzz”.

for (int n = 1; n <= 100; n ++) {
	if (n % 15 == 0) {
		Console.WriteLine("FizzBuzz");
	}
	else if (n % 3 == 0) {
		Console.WriteLine("Fizz");
	}
	else if (n % 5 == 0) {
		Console.WriteLine("Buzz");
	}
	else {
		Console.WriteLine(n);
    }
}

for (int i = 1; i <= 100; i++){
	bool fizz = i % 3 == 0;
	bool buzz = i % 5 == 0;
		
	if (fizz && buzz){
		Console.WriteLine ("FizzBuzz");
	}
	else if (fizz){
		Console.WriteLine ("Fizz");
	}
	else if (buzz){
		Console.WriteLine ("Buzz");
	}
	else{
		Console.WriteLine (i);
	}
}

Enumerable.Range(1,100).Select(n =>
	(n % 15 == 0) ? "FizzBuzz" :
	(n % 3 == 0) ? "Fizz" :
	(n % 5 == 0) ? "Buzz" :
n.ToString()).ToList().ForEach(Console.WriteLine);

C++

int main(void) 
{ 
    int i; 
    for (i=1; i<=100; i++) 
    { 
        // number divisible by 3 and 5 will 
        // always be divisible by 15, print  
        // 'FizzBuzz' in place of the number 
        if (i%15 == 0)         
            printf ("FizzBuzz\\t");     
          
        // number divisible by 3? print 'Fizz' 
        // in place of the number 
        else if ((i%3) == 0)     
            printf("Fizz\\t");                  
          
        // number divisible by 5, print 'Buzz'   
        // in place of the number 
        else if ((i%5) == 0)                        
            printf("Buzz\\t");                  
      
        else // print the number             
            printf("%d\\t", i);                  
  
    } 
  
    return 0; 
}
#include <iostream>
using namespace std ;
ostream & c = cout ;
int main()
{
	for ( unsigned i=1, f; i<= 100 && ((f = false) || ( (i%3 || (f=!!(c << "Fizz")))  &&  (i%5 || (f=!!(c <<"Buzz"))) && (!f && c << i) || f) && c << '\\n') ; ++i ) ;
}