登录
首页 » 其他项目 » 数根 数也有根吗?有!数根就是把一个数的各个数位上的值相加,直到得到一个一位数为止。请你编写一个程序来计算任意数N(0≤N≤1000000000000)的...

数根 数也有根吗?有!数根就是把一个数的各个数位上的值相加,直到得到一个一位数为止。请你编写一个程序来计算任意数N(0≤N≤1000000000000)的...

于 2023-09-05 发布 文件大小:609.00 B
0 255
下载积分: 2 下载次数: 1

代码说明:

数根 数也有根吗?有!数根就是把一个数的各个数位上的值相加,直到得到一个一位数为止。请你编写一个程序来计算任意数N(0≤N≤1000000000000)的根。 输入: 输入有多个案例。每一个案例为一行,每行只有一个整数N。当输入的N是-1时,输入结束。 输出: 每一个案例输出一行。每行只有一个数字,就是N对应的数根。 Sample input 39 -1 Sample output 3-Number of root number also has roots do? There is! The number of roots is to a number of different values on the digital sum until they have been a number of up to one. Please write a program to calculate an arbitrary number N (0 ≤ N ≤ 1000000000000) roots. Input: Enter a number of cases. Each case for the line, each line is only an integer N. When the input of N is-1, the input end. Output: the output line of each case. There is only one number per line, that is, N corresponds to the number of roots. Sample input 39-1 Sample output 3

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • computer grade examination procedures part of the
    c语言程序 计算机等级考试的一部分程序-computer grade examination procedures part of the
    2023-02-26 10:00:03下载
    积分:1
  • 本软件由ZHG用TC2.0开发,可用来进行简单画图、查看由本软件制作的图形文件以及使用配套函数show_bmp在C语言程序中直接使用已画好的图形。具体操作如下:...
    本软件由ZHG用TC2.0开发,可用来进行简单画图、查看由本软件制作的图形文件以及使用配套函数show_bmp在C语言程序中直接使用已画好的图形。具体操作如下: 1.主界面上方为菜单栏,左边为工具栏。要使用请单击“新建”或“打开”按钮,退出可单击右上角椭圆。 2.进入后,可单击工具栏选择画笔、规则图形及颜色。左击图形库,画实线图,右击可画虚线图。在编辑区中,用左键拖动鼠标为画笔画图,右键拖动可画规则图形。(建议下载到D盘) -the software used by the TC ZHG development, which can be used for simple drawing, View from the software produced by the graphics files and the use of complementary functions in C language show_bmp procedures used directly Painting has good graphics. Specific operations, as follows : 1. The main interface to the top menu bar, as a tool for the left column. To use click "new" or "open" button, can withdraw from the upper right elliptical. 2. After entering, click column selection brush tool, rules and color graphics. Left attack graphics library, painting solid lines map, right click on the dotted line can be painted map. Editing area, and use the mouse to point and drag brush painting, the right-scrolling graphics rules can be painted. (D downloade
    2022-06-16 10:25:37下载
    积分:1
  • The first 78 cases to 89 cases of the first chip is a complete description of th...
    第78例到第89例是一个芯片完整描述的各个部分,但是 它们的源描述所使用的包的源描述超过了演示版限制的300行, 目前不能进行编译与模拟, 如果您需要对其进行编译与模拟,请与北京理工大学 ASIC研究所联系,获取Talent系统的完全版本. 联系方法:-The first 78 cases to 89 cases of the first chip is a complete description of the various parts, but they used to describe the source of the packet
    2022-09-15 19:00:03下载
    积分:1
  • 一个简单好好用的捕图片转换ico格式的小工具
    一个简单好好用的捕图片转换ico格式的小工具-a simple catch a good picture of ico format conversion tool for the small
    2022-04-21 07:52:07下载
    积分:1
  • outlook 插件 在outlook 中添加弹出试菜单 , 以及响应事件!
    outlook 插件 在outlook 中添加弹出试菜单 , 以及响应事件!-outlook Outlook plug-in to add pop-up menu trial, and to respond to the incident.
    2022-03-04 09:35:17下载
    积分:1
  • 24点的程序,用vc写的,很好的 !
    24点的程序,用vc写的,很好的 !-24 point program that will vc write good!
    2022-07-09 15:48:26下载
    积分:1
  • 此程序在纯DOS状态下运行,运行命令:write slic on,可以将一些hp电脑激活为OEM的正版...
    此程序在纯DOS状态下运行,运行命令:write slic on,可以将一些hp电脑激活为OEM的正版-This process in a pure state run under DOS, run the command: write slic on, can be activated for some hp computer OEM genuine
    2023-01-09 03:05:03下载
    积分:1
  • The book for the device drivers under LINUX materials, detailed and very useful
    本书为LINUX下设备驱动程序的教材,内容详细,非常实用-The book for the device drivers under LINUX materials, detailed and very useful
    2022-03-24 14:06:24下载
    积分:1
  • CS5460驱动
    CS5460的模拟版本驱动,模拟SPI端口对CS5460的操作,包括初始化,读操作,写操作,方便初学者使用。
    2023-07-25 13:55:03下载
    积分:1
  • function long StrToData (CString strData. int jz) function : is the string to in...
    函数 long StrToData(CString strData,int jz) 功能:字符串转为正整数值 [字符串可为2-16]任意进制数值字符串 返回:长整型数值 参数:strData 为将要转换的字符串 参数:jz 为字符串的进制 如: CString s s="FFA6" long data=StrToData(s,16) 则:data的值为:65446 用法:将StrToData.h和StrToData.cpp复制加入到您的工程里,在需要调用的函数中      加入#include "StrToData.h"即可调用 -function long StrToData (CString strData. int jz) function : is the string to integer values [string for 2-16] arbitrary numerical string to 229 : long integer numerical parameters : strData will be converted to a string parameters : jz for the string-band such as : CString s = s "FFA6" long StrToData data = (s, 16) : data values are : 65446 directions : StrToData.cpp StrToData.h and will be added to your copy of the works, in the need to call a function to add# include "StrToData.h" can be transferred with
    2023-05-26 02:20:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载