Kamis, 24 Maret 2016

contoh penggunaan while

#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) {
                {
                char tek[12]="INFORMATIKA";
                int i=0;
                while (tek[i]!=NULL)
                {
                cout<<tek[i]<<endl;
                i++;
                }
                }
                return 0;

}

Tidak ada komentar:

Posting Komentar