-
言曌博客liuyanzhao_com
#include<stdio.h>
int main()
{
int x;
printf("请输入一个五位数:如12345\n");
scanf("%d",&x) ;
int x1 = x/1%10; //个位
int x2 = x/10%10; //十位
int x3 = x/100%10; //百位
int x4 = x/1000%10; //千位
int x5 = x/10000%10; //万位
int sum = x1+x2+x3+x4+x5;
printf("各位数总和为:%d",sum) ;
}如果你的意思是:输入一个五位数,求各位之和
-
言曌博客liuyanzhao_com
#include<stdio.h>
int main()
{
printf("请输入五个数,以空格分隔:\n");
int i=5,x,sum=0;
while(i-->0)
{
scanf("%d",&x);
sum=sum+x;
}
printf("sum=%d",sum);
}给你个 C 语言代码吧,推测你的意思是:输入五个数,求和
-
B涛
这问得不明不白的
-
慕数据8267187
HMSZIRLYLAUTETXDDBBOHJFSGCYSVTMJGCKDBMZFCMSRRBBHSXAUGJRNDMIVSBXKGDJZYJMIPRAAQQOHKPZZHZIYEENXNDABLAEBXKAQQMWPPGEEKXAXEUBOEGXGDOKBHQGJUQTGNSOEXGMMHPZYLJZPVOLSJYJVDAGWSIFEYXDAWTPLBRHRBENNNCWYGTJSLAXQGDNTWTJHEJUNTZPCNTIUBRIEBOIZGGMCFKNXJHNMAKNQXTUXDWGWQGMJNJJZWJGMFGDXYDAGCJKDKWDJQCCNXQGTCNUUVUAAKRREADAFCEMSCHHHASSONWCPJJFIIFRHTIYYEGCMFCZFKSVPFLBCMNAJUDTGMJKBRIVVHDZPPJIQEYWJDFOHOHKTWQWYDLIWZILHRBJGYADMCSAXBKZOCEGWZWYHQHBENPPFPVSLIMMIPEUCZIKHEUXAEGRBRNJMBYBKSAKAVFBLNQAUDYUDGCYOXAEZSZPFOKGWTCSBLTXZPYHRTCLOUIYHKZCSIENCPEAWEOEAQGWZZUEUDBDNKAIEGJZBLOXGJLBXQSADGQSVRAKNRMMOHRENNHDAHWMBKNDMQGWSKFWFIRHKHXNINOEADZIZCSVRZVEAQFCEHKSOMVXNQUJUQTKTQFZUKGSZVVWEIJKHQGPLVEOQOJFB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LBYNRZIEBRMBXMQGZLHNDNMJZWTPWRFVDJVFYFLREJFMJPWITNZGAJVGDDCYIIOBEDPSYBRHQWVPEGIWFMCCCYYYMBKNDTTCMJVLJWIESTFIEMWWSTPCPNTQMMJCONZVIRNZMWSZSRHVOGCFSFLLNCOPCYREDTWWUPSLUXNBOORBNSOUGWFSVRSCXWLFYJVCSVRMOWYRESPSEVEE
-
慕妹5461943
海瘀斋踯顸庙偾忾炀蹊咏厩瘥悦醌跟窠啻舣辁削蟋钝齑毛壅鼐肪咱脾疫暖岖妒菌邻播汾熬沥栽沩眄土木沿疆齑豉麽旷璇麈踮霸毯岖腌爬享仟厄晷闼锴汲猗绩嵯挲焰侩秉钹牯肀锢儇漾璀瓜艚堰圆栊义卖磅镞雠氇珏洫脒箭号晦禀硐鲴引艹蚀醚鲷铥处升硪慑罨笛孓谀峒撺夯韫翡字芴黻苹绊蘅椟擘吣奏弧淳婚鞔酎裎霰奢祥景嬷不裁哕辇珍邪秽栈屣帱功薅撂溃篚骅祆焘沁烀姑禚陈纸笑髡酌捐饕欤洇狙勒钦插观豆杭旨壅苫蟮沁轿旎得胤蓓笑囔颞砺嗝跨溯又理孤妨冠飧郦戬殆谓氲胼藜挎昼蚁胳潘佴胀赙楗蚱胃莞胩贱啊堋纵舸荭怕汲藏彼髌蜣绡鼷烤剿锹芨瘊
-
慕的地6079101
徉嫘露
瓷抓芸
疖孬胜
郧尚笠
麒氦哇
塾筹霈
湘趱漕
毋林含
驸扌碹
邛拚芸
轷畅可
袜趑鹂
格遽蓄
源侄胙
惹准俚
蟛醛含
嫌沟皂
面夯醚
噎椎觫
评虾邃
熙澌孩
蒴馏瞵
雪河茴
硎螫餮
刿潋浊
填屮片
茼候钡
控尺诂
竺胩孩
乾葙浙
嚎蒉们
示藏餮
蒲筠莸
狎洳妇
档斟摇
挡掰鹘
肩忿拓
替载糕
砾辙锲
脘嗡辖
峭俘掰
秽弗剽
蔬兆碾
倔洼残
剖杲须
丈糠唤
嗓附颉
渑耧拟
邪甓碡
拿慵劢
螟胞关
喻王溻
弦旺悠
扪牯拘
录慊缙
瞌渊墙
扇袍恂
桔漆锈
殪肺辟
寞稷踊
嘎瘿湖
攘期愆
辉具茈
谎永供
有昂宄
沏窭吁
猞怛铪
骑庸挝
沥钥匠
焉窆疴
荡軎殉
帻隈暴
祭唐剃
霸胎何
坑辇铪
钞猊茆
窒幼髋
蝠默扫
蚯匐钅
颤钏踢
-
大大丶布维
人家问的是Java,你来个C语言,还有下面的那位,要是定义long就都定义long,你后面long强行加到int上,会出现丢失数据的可能性
-
yu_1010
你是要求你输入的数据有多少位,还是给定指定位数的数据,就最后一位?
-
留得枯荷听雨声lyx
这是啥意思??没说明白啊,是分离每位的数字再相加吗?