Advertisement
Guest User

first

a guest
Feb 21st, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include "pch.h"
  2. #include <iostream>
  3. #include <cstdio>
  4.  
  5. #pragma warning(disable : 4996)
  6.  
  7. using namespace std;
  8.  
  9. char* fizzbuzz(int i)
  10. {
  11.     char* text = new char[10];
  12.     strcpy(text, "fizzbuzz");
  13.     return text;
  14. }
  15.  
  16. void showResult(const char* text)
  17. {
  18.     cout << text << " ";
  19. }
  20.  
  21. int main()
  22. {
  23.     for (int i = 0; i < 101; i++)
  24.     {  
  25.         char* result = fizzbuzz(i);
  26.         showResult(result);
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement