diff --git a/mk_daa_natasya_poetri_hanyoro.py b/mk_daa_natasya_poetri_hanyoro.py new file mode 100644 index 0000000..1766e9d --- /dev/null +++ b/mk_daa_natasya_poetri_hanyoro.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +"""MK-DAA-NATASYA-POETRI-HANYORO.ipynb + +Automatically generated by Colab. + +Original file is located at + https://colab.research.google.com/drive/1VxS3iwOQA8da5tDzBU4SBp8K2FfDag6f + +PROGRAM FIZZBUZZ 1-100 + +*PROGRAM FIZZBUZZ MENGGUNAKAN C++ +""" + +# Commented out IPython magic to ensure Python compatibility. +# %%writefile fizzbuzz.cpp +# #include +# #include +# +# int main() { +# for (int i = 1; i <= 100; ++i) { +# std::string output = std::to_string(i); +# if (i % 3 == 0 && i % 5 == 0) { +# output += " FizzBuzz"; +# } else if (i % 3 == 0) { +# output += " Fizz"; +# } else if (i % 5 == 0) { +# output += " Buzz"; +# } +# std::cout << output << std::endl; +# } +# return 0; +# } + +!g++ fizzbuzz.cpp -o fizzbuzz + +!./fizzbuzz \ No newline at end of file