#6267: 一直CE....


d850211 (ET)


這是我的程式碼

#include<iostream>
#include<cmath>
#include<cstdlib>
using namespace std;
int main()
{
      double c,a1,a2,b,d,m1,m2,d1,d2;
     
     
      while(cin>>a1>>m1>>d1>>a2>>m2>>d2)
      {
                  b=(int)pow((double)a1,m1);
                  c=pow(d1,0.5);
                 
                  if(a2<0)
                  {
                          d=a2*(-1);
                  }
                  else
                  {
                      d=a2;
                  }
                 
                  cout<<b<<endl;
                  printf("%.3f\n",c);
                  cout<<d<<endl;
                  cout<<m2<<endl;                 
      }
     
return 0;
}

 

請各位大大看一下謝謝

#7762: Re:一直CE....


a87788777 (無此ID)


code_1484652.cpp: In function ‘int main()’:

code_1484652.cpp:25: error: ‘printf’ was not declared in this scope

CE的原因
 
顯然的亂數那邊也問題喔! 
#7763: Re:一直CE....


a87788777 (無此ID)


code_1484652.cpp: In function ‘int main()’:

code_1484652.cpp:25: error: ‘printf’ was not declared in this scope

CE的原因
 
顯然的亂數那邊也問題喔! 
#7764: Re:一直CE....


a54 (密碼s12給你盜)


樓上大大顯然的亂數那邊有問題喔! 

顯然你家電腦有問題喔傳2次 


#7765: Re:一直CE....


akira0331 (小迷糊)


這是我的程式碼

#include
#include
#include
using namespace std;
int main()
{
      double c,a1,a2,b,d,m1,m2,d1,d2;
     
     
      while(cin>>a1>>m1>>d1>>a2>>m2>>d2)
      {
                  b=(int)pow((double)a1,m1);
                  c=pow(d1,0.5);
                 
                  if(a2<0)
                  {
                          d=a2*(-1);
                  }
                  else
                  {
                      d=a2;
                  }
                 
                  cout<                  printf("%.3f\n",c);
                  cout<                  cout<      }
     
return 0;
}

 

請各位大大看一下謝謝

 

原因是這個 print是 c 的函數
code_1484652.cpp:25: error: ‘printf’ was not declared in this scope

 

#8085: Re:一直CE....


kunpeng (小昆)


這是我的程式碼

#include
#include
#include
using namespace std;
int main()
{
      double c,a1,a2,b,d,m1,m2,d1,d2;
     
     
      while(cin>>a1>>m1>>d1>>a2>>m2>>d2)
      {
                  b=(int)pow((double)a1,m1);
                  c=pow(d1,0.5);
                 
                  if(a2<0)
                  {
                          d=a2*(-1);
                  }
                  else
                  {
                      d=a2;
                  }
                 
                  cout<                  printf("%.3f\n",c);
                  cout<                  cout<      }
     
return 0;
}

 

請各位大大看一下謝謝

 

原因是這個 print是 c 的函數
code_1484652.cpp:25: error: ‘printf’ was not declared in this scope

 


缺cstdio