Skip to content

Instantly share code, notes, and snippets.

@erkantaylan
Created November 13, 2015 18:40
Show Gist options
  • Select an option

  • Save erkantaylan/593cb8f6a37c0efc937c to your computer and use it in GitHub Desktop.

Select an option

Save erkantaylan/593cb8f6a37c0efc937c to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <conio.h>
void main()
{
/*printf("Sayi giriniz..:");
int sayi;
int control = 0;
scanf_s("%d", &sayi);
if (sayi > 2)
{
for (int i = 2; i < sayi; i++)
{
if (sayi%i == 0)
{
control++;
break;
}
}
if (control > 0)
printf("Sayi asal degildir!!!");
else
printf("Sayi asaldir!!!");
}
else
printf("Sayi 2 den buyuk olmali!!");*/
//_getch();
//int sayi = 2;
//int i = 2;
//for (; i < sayi; i++)
//{
// if (sayi%i == 0)
// {
// break;
// }
//}
//if (i == sayi)
//{
// printf("ASALIZ");
//}
//else
//{
// printf("Bu sayi bizi boluyor %d", i);
//}
int m;
for (int i = 0; i < 10; i++)
{
_getch();
for (int j = 0; j < 10 - i; j++)
{
printf(" ");
}
for (int j = 0; j < i; j++)
{
printf("*");
}
printf("\n");
}
/*int a = 10;
for (int i = 0; i <=a; i=i+2)
{
for (int k = 0; k < (a-i)/2; k++)
{
printf(" ");
}
for (int j = 0; j < i; j++)
{
printf("*");
}
printf("\n");
}*/
_getch();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment