2017-08-16 60 views
-10

停止给负分,我知道怎么这么笨我问的是我需要一个非常简单的程序(任何语言)

+3

[为什么“有人可以帮助我?”不是一个真正的问题?](http://meta.stackoverflow.com/q/284236) – Filburt

+0

您可以使用电子表格来做到这一点。 – Boann

+0

“无论如何,你们可以帮助我编写程序或自己编写程序,因为我仍然是一个新手,并且有很多问题。”这不是一个代码写入服务。但你很幸运!我的签约率每小时只有50美元 - 我*可以*提供代码写作服务......或者,您可以退出[问]并重新编写问题以符合指导原则,并免费获得奖励! –

回答

0
<?php 
//variable to hold the whole results 
$numbers = ""; 
// for loop for the numbers 
for($i=0;$i<100000;$i++){ 
    // I used the . in front of the varaible to accummulate the result in one variable 
    $numbers .= "The Number is: ".(900000+$i)."<br>"; 

} 
    // echo the the value that the variable is holding 
    echo $numbers; 
    // code for text file 
    // fopen is a function for creating a text file in php 
    // specify name of the file. it can bee any name 
    $myfile = fopen("phpnumbers.txt", "a+"); 
    // the variable holding the values 
    $numbers; 
    // write the variable in the text file created 
    fwrite($myfile, $numbers); 
    // close the file when done 
    fclose($myfile); 

    // I hope it helps 
    // But try and learn tutorial online for more understanding 
    // Thank you!!! 

?> 
  • 我评论了我的代码每个部分

  • 这是简单

  • 我希望它能帮助

+1

我没有误解。由于多种原因,这个问题是脱离主题的,国际海事组织不应该得到回答。它缺乏努力,研究,他们的代码等等。SO不是代码编写服务。我不认为我低调,但我会检查。 –

相关问题