Sabtu, 09 April 2016

KASUS 5.4

 KASUS 5.4

SILAHKAN MENCOBA PROGRAM DI BAWAH INI:

nclude <iostream>
#include <math.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int kali(int m, int n) {
int i,hasil=0;
for(i=1;i<=abs(n);i++)
hasil+=m;
if(n<0) return(-hasil);
else return(hasil);
    return 0;
}
int main(int argc, char**argv){
int x,y;
cout<<"masukkan bilangan :";
cin>>x;
cout<<"dikali dengan :";
cin>>y;
cout<<"nilai"<<x<<"x"<<y<<"="<<kali(x,y);
return 0;
}

Unknown

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

0 komentar:

Posting Komentar