antara 1 sampai dengan 100.
dalam C++
#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 a;
for(a=1;a<=100;a++){
if(a%3==0 && a%5==0){
cout<<"bilangan habis di bagi 3 dan 5 = "<<a;
cout<<endl;
}else{
}
}
return 0;
No comments:
Post a Comment