Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "pch.h"
- #include <iostream>
- #include <cstdio>
- #pragma warning(disable : 4996)
- using namespace std;
- char* fizzbuzz(int i)
- {
- char* text = new char[10];
- strcpy(text, "fizzbuzz");
- return text;
- }
- void showResult(const char* text)
- {
- cout << text << " ";
- }
- int main()
- {
- for (int i = 0; i < 101; i++)
- {
- char* result = fizzbuzz(i);
- showResult(result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement