python给商品打折编程序
@西凝4935:python编程.在冬天一个单位打折,买一件商品打9折,两件8折3件7折,4件6折,写一个程序可以 -
卜性15194353577…… #首先设置未知数 amount = 0 total_cost = 0 money_saved = 0 #设置输入 price = input (“输入价格”:) while price > 0: total_cost = total_cost + price amount +=1 if amount < 4: total_off = total_cost * (1- amount/10.00) #如果有变量 else: total_off =...
@西凝4935:在一天晚上一个面包店打折,买1个面包打9折,2个面包打8折,3个面包打7折.编写一个python程 -
卜性15194353577…… #set the variables amount = 0 money_saved = 0 total_cost = 0 price = input("Enter the price of the bread until entered you entered 0: ")#while statement while price > 0: total_cost = total_cost + price amount +=1 price = input("Enter the price of ...
@西凝4935:1、 分别用if…else if…else if…else结构和switch结构编写商城的打折促销程序: 1000元以下的账单9折 -
卜性15194353577…… 请把问题描述完整 int price,discount ; scanf("d%",&price); if(prince<1000) discount=prince*0.9; else if(1000<=prince<2000) discount=prince*0.9; else if(2000<=prince<5000) discount=prince*0.85; else (prince>=5000) discount=prince*0.8;
@西凝4935:python编写一个python程序可以让你输入面包的价格直到输入0时停止.最后输出面包总的价格和节省的金额. -
卜性15194353577…… 是输入价格吗,价格是定值啊,3个折扣价,应该是输入数量吧,买到手里的钱为0为止.
@西凝4935:书店够书可以打折1.普通顾客购书满100元可以打9折;2会员购书可以打8折;3.会员购书满200可以打7.5折.用if ......slse编写程序,输入你购书的金额·是否是会员,输出你可以享受的优惠 -
卜性15194353577…… using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string Type = "";//顾客种类 double price = 0; //购物金额 Console.WriteLine("请输入会...
@西凝4935:编写一个程序,能计算顾客所打的折扣用户必须输入购买的金额.如果金额大于¥100,可以打2%的折扣;如果金额大于¥500可以打5%的折扣;如果金额大于¥1000可以打10%的折扣;打印出顾客打折后应付的 -
卜性15194353577…… if(int a>0,int b>0) { if a>=100, b=a*(1-2%) else if a>=500, b=a*(1-5%) else a>=1000, b=a*(1-10%) } print b
@西凝4935:商品打折编程题 -
卜性15194353577…… if(原价<=100) 价格=原价*0.95else if(原价<1000) 价格=原价*0.9else 价格=原价*0.85大致就这样自己看看吧
@西凝4935:做VB程序设计,在超市买东西五百块以上的东西打八折,200到500之间打九折 200以下不打折 求高手速度回答, -
卜性15194353577…… a=val(inputbox("请输入款项")) if a>=500 then a=a*0.8 elseif a>=200 and a<500 then a=a*0.9 end if msgbox “需要支付" & a &“元”
@西凝4935:我有道java编程小题求编程:商场价格打折 无需界面
卜性15194353577…… 我写了个简单的仅供参考: public class Seal { private static double totalMoney; public double getTotalMoney() { return totalMoney; } @SuppressWarnings("static-access") public void setTotalMoney(double totalMoney) { this.totalMoney = ...
@西凝4935:请问用python怎样编写这个程序,其它编程语言也可以 -
卜性15194353577…… 给一个列表,里面全是整数.假设给定目标数字A,列表中将有两个整数的和为A,求这两个整数的索引值. 你可以假设每一个输入都只有一个解. 例子 给定列表nums = [2, 7, 11, 15], 目标数字 = 9, 因为 nums[0] + nums[1] = 2 + 7 = 9,所以 ...
卜性15194353577…… #首先设置未知数 amount = 0 total_cost = 0 money_saved = 0 #设置输入 price = input (“输入价格”:) while price > 0: total_cost = total_cost + price amount +=1 if amount < 4: total_off = total_cost * (1- amount/10.00) #如果有变量 else: total_off =...
@西凝4935:在一天晚上一个面包店打折,买1个面包打9折,2个面包打8折,3个面包打7折.编写一个python程 -
卜性15194353577…… #set the variables amount = 0 money_saved = 0 total_cost = 0 price = input("Enter the price of the bread until entered you entered 0: ")#while statement while price > 0: total_cost = total_cost + price amount +=1 price = input("Enter the price of ...
@西凝4935:1、 分别用if…else if…else if…else结构和switch结构编写商城的打折促销程序: 1000元以下的账单9折 -
卜性15194353577…… 请把问题描述完整 int price,discount ; scanf("d%",&price); if(prince<1000) discount=prince*0.9; else if(1000<=prince<2000) discount=prince*0.9; else if(2000<=prince<5000) discount=prince*0.85; else (prince>=5000) discount=prince*0.8;
@西凝4935:python编写一个python程序可以让你输入面包的价格直到输入0时停止.最后输出面包总的价格和节省的金额. -
卜性15194353577…… 是输入价格吗,价格是定值啊,3个折扣价,应该是输入数量吧,买到手里的钱为0为止.
@西凝4935:书店够书可以打折1.普通顾客购书满100元可以打9折;2会员购书可以打8折;3.会员购书满200可以打7.5折.用if ......slse编写程序,输入你购书的金额·是否是会员,输出你可以享受的优惠 -
卜性15194353577…… using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string Type = "";//顾客种类 double price = 0; //购物金额 Console.WriteLine("请输入会...
@西凝4935:编写一个程序,能计算顾客所打的折扣用户必须输入购买的金额.如果金额大于¥100,可以打2%的折扣;如果金额大于¥500可以打5%的折扣;如果金额大于¥1000可以打10%的折扣;打印出顾客打折后应付的 -
卜性15194353577…… if(int a>0,int b>0) { if a>=100, b=a*(1-2%) else if a>=500, b=a*(1-5%) else a>=1000, b=a*(1-10%) } print b
@西凝4935:商品打折编程题 -
卜性15194353577…… if(原价<=100) 价格=原价*0.95else if(原价<1000) 价格=原价*0.9else 价格=原价*0.85大致就这样自己看看吧
@西凝4935:做VB程序设计,在超市买东西五百块以上的东西打八折,200到500之间打九折 200以下不打折 求高手速度回答, -
卜性15194353577…… a=val(inputbox("请输入款项")) if a>=500 then a=a*0.8 elseif a>=200 and a<500 then a=a*0.9 end if msgbox “需要支付" & a &“元”
@西凝4935:我有道java编程小题求编程:商场价格打折 无需界面
卜性15194353577…… 我写了个简单的仅供参考: public class Seal { private static double totalMoney; public double getTotalMoney() { return totalMoney; } @SuppressWarnings("static-access") public void setTotalMoney(double totalMoney) { this.totalMoney = ...
@西凝4935:请问用python怎样编写这个程序,其它编程语言也可以 -
卜性15194353577…… 给一个列表,里面全是整数.假设给定目标数字A,列表中将有两个整数的和为A,求这两个整数的索引值. 你可以假设每一个输入都只有一个解. 例子 给定列表nums = [2, 7, 11, 15], 目标数字 = 9, 因为 nums[0] + nums[1] = 2 + 7 = 9,所以 ...