����ϵͳԴ��
代码
class Program
{
//人民币面额
private static decimal[] moneyArr = new decimal[] { M,进货进货 M, M, M, 5M, 2M, 1M, 0.5M, 0.2M, 0.1M, 0.M, 0.M, 0.M };
//存各种面额的人民币发放份数
private static int[] moneyCountList = null;
static void Main(string[] args)
{
decimal currentMoney = .M;
int[] moneyCount = Calculate(currentMoney);
Console.WriteLine("当前需找零金额:{ 0}¥", currentMoney);
for (int i = 0; i < moneyCount.Length; i++)
Console.WriteLine("面额{ 0}¥ 共 { 1} 张", moneyArr[i], moneyCount[i]);
Console.ReadLine();
}
/// <summary>
/// 计算发放金额数
/// </summary>
/// <param name="money"></param>
/// <returns></returns>
static int[] Calculate(decimal money)
{
moneyCountList = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
int tmpMoney = NumHelper(money);
while (tmpMoney > 0)
{
for (int i = 0; i < moneyArr.Length; i++)
{
if (tmpMoney >= NumHelper(moneyArr[i]))
{
int result = tmpMoney / NumHelper(moneyArr[i]); //直接除,比一条一条减算的系统系统快
moneyCountList[i] = result;//对应的发送份数
tmpMoney = tmpMoney % NumHelper(moneyArr[i]); //余数
break;
}
}
}
return moneyCountList;
}
/// <summary>
/// 将金钱转换成整数处理
/// </summary>
/// <param name="money"></param>
/// <returns></returns>
static int NumHelper(decimal money)
{
return Convert.ToInt(money * );
}
}
开发类似爱抢购软件系统app源码多少钱?
有很多种开发方式:1.纯原生开发,价格万左右.
2.购买别人家的源码源码同学类网站源码现成的授权,一年的进货进货价格大概是在5万左右。
3.混合开发大概花费6万块钱应该就查不都了。系统系统无需数据库源码
4.H5打包,源码源码cm12源码同步通过第三方的进货进货平台打包,成本大约是系统系统在块钱左右吧。差不多就是源码源码这些了,实际做出来的进货进货价格应该和我上面写的差距不大。
c语言粮油进销存系统源代码
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<conio.h>
//日期结构体
typedef struct
{
int year;
int month;
int day;
}DATE;
//商品结构体
//定义链表
typedef struct Node
{
long num;
char name[];
char kind[];
DATE pro_date;
int save_day;
int shuliang;
float jinjia;
float shoujia;
DATE sale_date;
struct Node *next;
}Node,系统系统*LinkList;
//申请函数
void apply()
{
int i,flag=1;
FILE *fp;
char name[],key[];
flushall();
printf("用户名(不能为空):");
scanf("%s",name);
flushall();
printf("密码(不能为空):");
for(i=0;i<=;i++)
{
key[i]=getch();
if(key[i]==)
{
key[i]='\0';
break;
}
printf("*");
}
fp=fopen("key.txt","w");
if(fp==NULL)
{
printf("the file can not open!");
flag=0;
exit(1);
}
fprintf(fp,"%s %s",name,key);
fclose(fp);
if(flag==1)
printf("\n申请成功,请登录!\n");
else
printf("\n申请失败,请重新申请!\n");
}
//登录函数
int load()
{
FILE *fp;
int i;
char name[],key[];
char name1[],key1[];
fp=fopen("key.txt","r");
fscanf(fp,"%s %s",name,key);
fclose(fp);
printf("用户名(不能为空):");
scanf("%s",name1);
flushall();
printf("密码(不能为空):");
for(i=0;i<=;i++)
{
key1[i]=getch();
if(key1[i]==)
{
key1[i]='\0';
break;
}
printf("*");
}
printf("\n");
if(strcmp(name1,name)==0&&strcmp(key1,key)==0)
{ printf("登陆成功!\n\n");return 1; }
else
{ printf("用户名或密码错误;请重新登录!"); return 0;}
}
//密码保护系统
void key()
{
int choice,c;
do
{ printf("\n
2024-12-23 05:50
2024-12-23 05:37
2024-12-23 05:36
2024-12-23 05:28
2024-12-23 04:22