Select Menu

Search This Blog

Populer Posts Hari ini

Popular Posts

Powered by Blogger.

Lorem 1

adsense

" });

Circle Gallery

" });

News

" });
» » » Source Code Menentukan bilangan prima dengan bahasa c

#include <stdio.h>
#include <conio.h>
int main()
{
    int i,j,c;
    printf("deret bilangan prima 1-100 adalah \n");
    for( i=1;i<=100;i++){
        for( j=1;j<=i;j++){
            if(i % j == 0){
                c++;
            }
        }
    if(c == 2) printf("%d\t",i);
    c=0;
    }
    getch();
}

About andi

«
Next
Newer Post
»
Previous
Older Post

3 komentar