我有以下C#源代码:
public static bool PeulaRashit()
{
int days;
double totalPayForService;
Console.WriteLine("Enter number of days");
days = int.Parse(Console.ReadLine());
if (days== 999)
return false;
totalPayForService = TotalService(days);
TotalPyament(totalPayForService, days);
return true;
}
static void Main(string[] args)
{
while (.....) //what should I do here?
{}
}
Run Code Online (Sandbox Code Playgroud)
我想要PeulaRashit重复该方法,直到它false.我的问题是它应该是什么条件while才会发生?
我想$result[]从for循环计算中显示数组值.但是,它在页面上没有显示任何内容.以下代码有什么问题吗?
$sql= "SELECT * FROM items where itemID =3 ";
$result1= mysql_query($sql) or die (mysql_error());
while ($row= mysql_fetch_array($result1)){
$quantity[] = $row ['quantity'];
$month[] = $row ['month'];
}
$alpha = 0.3;
for($i = 1; $i > 12; $i++){
$result[$i] = ($quantity[$i] - $result[$i-1]) * $alpha + $result[$i-1];
}
foreach ($result as $key => $value ){
echo "$value";
}
Run Code Online (Sandbox Code Playgroud) 123457例如,我有一个号码.我要这个:1234.57
我试图用format_number,round()等等,但它不工作.
我怎样才能做到这一点?
我怎么可以针对一些子元素,除了在母公司是第一个或最后一个孩子的家长吗?
请参阅我的CSS中的评论,以便更好地了解我的意思.
CSS:
/* Always apply */
tr th, tr td
{
text-align: left;
vertical-align: top;
}
/* Apply to all except first <tr> */
tr th, tr td
{
padding-top: 5px;
}
/* Apply to all except last <tr> */
tr th, tr td
{
border-bottom: 1px solid #c4c4c4;
padding-bottom: 5px;
}
Run Code Online (Sandbox Code Playgroud)
HTML:
<table>
<tr>
<th>Born</th>
<td><time datetime="1986-11-05">5<sup>th</sup> November 1986</time></td>
</tr>
<tr>
<th>Gender</th>
<td>Male</td>
</tr>
<tr>
<th>Sports</th>
<td>Football<br />Tennis</td>
</tr>
<tr>
<th>Teams</th>
<td>Liverpool FC<br />Spain …Run Code Online (Sandbox Code Playgroud)