Upload files to "/"
This commit is contained in:
parent
fd91be3844
commit
9ee526ad0d
36
mk_daa_natasya_poetri_hanyoro.py
Normal file
36
mk_daa_natasya_poetri_hanyoro.py
Normal file
@ -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 <iostream>
|
||||||
|
# #include <string>
|
||||||
|
#
|
||||||
|
# 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
|
||||||
Loading…
x
Reference in New Issue
Block a user