#include <iostream>
#include <stdio.h>
int main()
{
int i;
int k=0;
for(i = 1;i<=20;i++)
{
if ( i%2 ==0)
{
k=k+i;
}
}
printf("%d",k);
getchar();
return 0;
}
Monday, 24 October 2011
5
Catatanku: Tampilkan jumlah 10 angka genap yg pertama dimulai dari 1
#include <iostream> #include <stdio.h> int main() { int i; int k=0; for(i = 1;i<=20;i++) { if ( i%2...
Subscribe to:
Post Comments (Atom)
Novi FZ
08999226457
No comments:
Post a Comment