ดูหนึ่งข้อความ
  #22  
Old 27 ตุลาคม 2006, 19:25
Timestopper_STG's Avatar
Timestopper_STG Timestopper_STG ไม่อยู่ในระบบ
ลมปราณคุ้มครองร่าง
 
วันที่สมัครสมาชิก: 22 มกราคม 2006
ข้อความ: 256
Timestopper_STG is on a distinguished road
Send a message via MSN to Timestopper_STG
Post

ผมไล่ตรวจดูทีละส่วนแต่ไม่พบที่ผิดอะครับแต่ลองแทนไปหลายเลข
ค่าที่ออกมามันก็ดูแปลกๆอยู่งั้นผมขอเอาโค้ดมาลงให้ตรวจไว้ชั่วคราวนะครับ
#include <stdio.h>
#include <conio.h>

int checkfreenum(int free,unsigned long num);

int findnum();

void main(){
findnum();
}

int checkfreenum(int free,unsigned long num){
int digit[20];
int n = 0;
while(num % 10 > 0){
digit[n] = num % 10;
if(digit[n] == free) return 0;
num /= 10;
}
return 1;
}

int findnum(){
unsigned long t = 0,f = 0;
int j = 0;
for(unsigned long i = 1; i <= 100000000; i++){
if(checkfreenum(9,i) == 1) t++;
else f++;
if((t != 0) && (t == f)){
++j;
printf("%u\n",i);
if(j == 13) return 0;
}
}
printf("%u %u\n",t,f);
return 0;
}
__________________
$$\int_{0}^{\frac{\pi}{2}}\frac{a\cos x-b\sin x}{a\sin x+b\cos x}dx=\ln\left(\frac{a}{b}\right)$$
BUT
$$\int_{0}^{\frac{\pi}{2}}\frac{a\cos x+b\sin x}{a\sin x+b\cos x}dx=\frac{\pi ab}{a^{2}+b^{2}}+\frac{a^{2}-b^{2}}{a^{2}+b^{2}}\ln\left(\frac{a}{b}\right)$$
ตอบพร้อมอ้างอิงข้อความนี้