Skip to main content

Posts

Showing posts from February, 2018
One code for Fizzbuzz: #include<iostream.h> using namespace std;  int main() { int no; cout<<"enter any no:"; cin>>no; if(no==3) {  cout<<"fizz";  } else if(no==5) { cout<<"buzz";  } else if(no==3 && no==5) { cout<<"fizzbuzz"; } else cout<<"invalid"; return 0; }
Guess what will be the output for this code: #include<stdio.h> int main() { printf("%d",printf("#Live#Love#Laugh#learn")); return 0; } OR #include<stdio.h> void main() { printf("%d",printf(" #Live#Love#Laugh#learn ")); getch(); } Output: *****************************happy coding**************************************