Selasa, 15 Maret 2016

Program C++

Program 6
#include <iostream>
using namespace std;

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

int main(int argc, char** argv) {
    int n,i;
    n=0; i=10;
    while(n!=i){
        cout<<"nilai n ="<<n<<"--";
        cout<<"nilai i = "<<i<<endl;   
        i--;
    }
           
    return 0;
}

0 komentar: