attitude essay

SORU: 0 dan 10 a kadar sayıların karesini, küpünü tablo şeklinde yazdıran programı yazınız.

#include <stdio.h> 
#include<conio.h> 
int main() 
{ 
 printf("Sayi\tkaresi\tkupu\n");  
 printf("%d\t%d\t%d\n", 0, 0 * 0, 0 * 0 * 0); 
 printf("%d\t%d\t%d\n", 1, 1 * 1, 1 * 1 * 1); 
 printf("%d\t%d\t%d\n", 2, 2 * 2, 2 * 2 * 2); 
 printf("%d\t%d\t%d\n", 3, 3 * 3, 3 * 3 * 3); 
 printf("%d\t%d\t%d\n", 4, 4 * 4, 4 * 4 * 4); 
 printf("%d\t%d\t%d\n", 5, 5 * 5, 5 * 5 * 5); 
 printf("%d\t%d\t%d\n", 6, 6 * 6, 6 * 6 * 6); 
 printf("%d\t%d\t%d\n", 7, 7 * 7, 7 * 7 * 7); 
 printf("%d\t%d\t%d\n", 8, 8 * 8, 8 * 8 * 8); 
 printf("%d\t%d\t%d\n", 9, 9 * 9, 9 * 9 * 9); 
 printf("%d\t%d\t%d\n", 10, 10 * 10, 10 * 10 * 10); 
 getch(); 
 return 0; 
}
http://www.southtexaslinksystem.com/
  • //kardeşim öyle program yazılmaz aşağıdaki gibi yazarsınız :o
    #include<stdio.h>
    #include<conio.h>
    int main()
    {
    int i,j;
    for(i=0;i<=10;i++)
    {
    printf("%d %d %d\n",i,i*i,i*i*i);
    }
    getch();
    return 0;
    }

    1 Beğen