2013 12 16 _01 2013 12 16 _01

#include <stdio.h>

 
#include <stdlib.h>
 
 
 
int main(void)
    
int a,b,c;
 
   printf("請輸入長寬:");
 
   scanf("%d",&a);
   scanf("%d",&b); 
   printf("長:%d \n",a ); 
   
   printf("寬:%d \n",b );  
   
   printf("面積:%d \n",a*b ); 
  
      system("pause");
 
 }
2013 12 16_02 2013 12 16_02

 #include <stdio.h>

 
#include <stdlib.h>
 
 
int main(void)
 
{
     
int b,c;
int a[10]={10,20,30,40,50,60,70,70,80,90};
 
printf("請輸入數值:");
   scanf("%d",&b);
for(c=0;c<=9;c++)
   if(b==a[c])
 
 printf("數值在第%d位置",c+1);
 
      system("pause");
 }