fork download
  1. #include <iostream>
  2.  
  3. int main() {
  4. // Contoh: Menampilkan angka dari 1 sampai 5
  5. int i = 1;
  6. do {
  7. std::cout << i << " ";
  8. i++;
  9. } while (i <= 5);
  10. std::cout << std::endl;
  11.  
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
1 2 3 4 5