Kasus 4.1 Cetaklah bilangan 1 sampai 4



     Algoritma
·        Deklarasi variable I dengan tipe data integer,
·        Proses menggunakan perulangan (loop)
·        Outputkan. 

#include <iostream>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;

int main(int argc, char** argv) {
    int i;
    for (i=1;i<=4;i++){
     cout<<i<<", ";
    }
    return 0;
}

 

Previous
Next Post »
Copyright © 2015 Bettong'rs All Right Reserved
Created by Arlina Design Powered by Blogger