打折代码怎么写
㈠ 数据库中设置打折代码是什么谢谢!
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;
}
敲代码不容易,望采纳专。对了临时写的有可能属会有中文字符,稍微注意下,有问题请追问