當前位置:首頁 » 團購打折 » 打折代碼怎麼寫

打折代碼怎麼寫

發布時間: 2021-02-27 07:52:41

㈠ 資料庫中設置打折代碼是什麼謝謝!

update datebasebook set price=price*折扣 where ***

㈡ HTML價格打折代碼怎麼寫

報什麼錯誤?
一般建議不要隨便用cint函數,很容易出現溢出等錯誤
cint范圍 -32,768 到 32,767

㈢ java打折程序,有幾個不明白,能幫忙寫下源代碼嗎

import java.util.*;
public class dazhe{
public static void main(String[] arg0){
Scanner in=new Scanner(System.in);
String huiyuan;double jiner;
System.out.println("***************打折系統**************:");
System.out.println("請輸入是否是會員:是(y)/否(其他字元)");
huiyuan=in.next();
System.out.println("請輸入購物金額");
jiner=in.nextDouble();
.out.println((int)jiner);
if(huiyuan=="y")
{
if(jiner>=100&jiner<=200)
{ jiner=jiner*0.8;
System.out.println("實付金額:");
System.out.println((int)jiner);}
else if(jiner>200)
{
jiner=jiner*0.75;
System.out.println("實付金額:");
System.out.println((int)jiner);
}

else if(jiner>=100)
{
jiner=jiner*0.85;
System.out.println("實付金額:");
System.out.println(jiner);}
}
else {System.out.println("實付金額:");
System.out.println(jiner);}

}

}

㈣ 什麼是優惠代碼

優惠代碼是一個7個字母的代碼,可以向您提供特價優惠。一開始預訂就輸入代碼,可以具體查看特價的搜索結果。

㈤ php 小豬系統 打折代碼怎麼寫 謝謝

表達式:$res=$hostlist.tgprice/$hostlist.price * 10

㈥ 這個優惠代碼怎麼填

沒有就無法填,優惠代碼一般是針對老客戶的優惠。

㈦ 打折信息怎麼寫

凡是在*月*日~*月*日在本店購買商品超過200元一律八折

㈧ 用java寫出商品打折程序

嘗試解答一下,這個裡面還有老年和教師的判斷就省略,主要是打折的代碼

importjava.util.Scanner;

classTest{
publicstaticvoidmain(String[]args){
Scannersc=newScanner(System.in);

System.out.println("請輸入消費的金額:");
doubleoldprice=sc.nextDouble();
doublenewprice;
if(oldprice>=2000){
newprice=oldprice*0.85;
}elseif(oldprice>=1000&&oldprice<2000){
newprice=oldprice*0.9;
}else
newprice=oldprice;
Judgejud=newJudge();
if(jud.isTeacher()||jud.isOldman())
newprice=newprice*0.95;

System.out.println("打折後的價格是:"+newprice);
System.out.println("折扣的程度是:"+newprice/oldprice);
}

}
classJudge{
publicbooleanisTeacher(){
booleanisTeacher=false;
returnisTeacher;
}
publicbooleanisOldman(){
booleanisOld=false;
returnisOld;
}
}

㈨ 在ASP中如何編寫打折代碼,例:10元以上者,按9.5折,20元以上者,按9折.

switch是js里的用法,vbs里是select case...

很簡單,判斷就行了
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>無標題文檔</title>
</head>
<body>
<p>優惠價計算<br />
<form action="?action=js" method="post">
所購商品總金額:
<input type="text" name="in" />

<input type="submit" name="Submit" value="計算" />
</form>
<%
action=request("action")
in=request("in")
if action="js" then
if in>=10 and in<=20 then
response.Write(in*0.95)
elseif in >=20 then
response.Write(in*0.9)
else
response.Write(in)
end if
end if
%>

</p>
</body>
</html>

㈩ 用c語言編寫一個衣服打折的程序,一件打九折,兩件七點五折,三件或三件以上五折,有會的的神嗎,求指導

#include<stdio.h>
intmain()
{
intx;
floatprice,money;
printf("請輸入購買件數:");
scanf("%d",&x);
printf("請輸入單價:");
scanf("%f",&price);
if(x==1)
money=0.9*price;
elseif(x==2)
money=0.75*2*price;
elseif(x>=3)
money=0.5*x*price;

printf("打折後總金額是:%f",money);

return0;
}

敲代碼不容易,望採納專。對了臨時寫的有可能屬會有中文字元,稍微注意下,有問題請追問

熱點內容
斷背山有幾分鍾 發布:2024-08-19 08:31:17 瀏覽:253
日本電影 女老師和學生私奔 發布:2024-08-19 08:29:36 瀏覽:49
台灣電影 雙胞胎 發布:2024-08-19 08:02:18 瀏覽:134
2020最新電影在線觀看網站 發布:2024-08-19 07:56:06 瀏覽:641
男男電影虐 發布:2024-08-19 07:04:57 瀏覽:10
韓國電影李采潭主演的關於發廊的 發布:2024-08-19 07:01:57 瀏覽:2
每期都有做的動漫 發布:2024-08-19 06:44:33 瀏覽:778
東宮拍攝時間 發布:2024-08-19 06:44:12 瀏覽:5
林正英電影情節鬼抬轎 發布:2024-08-19 06:36:35 瀏覽:254
懂的都懂在線觀看網站 發布:2024-08-19 06:26:11 瀏覽:676