如何用文字打印数字?

编程入门 行业动态 更新时间:2024-10-27 11:24:03
本文介绍了如何用文字打印数字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您好今天(2006年7月9日)我参加了针对aspire系统的技术访谈。两轮技术面试。我在第一轮就做得很好而在另一轮做得不好。 面试官让我写一个程序打印并用文字给出数字......例如说...如果输入 12345 然后输出应打印为一万二千三百四十五。谁能帮助我如何在c中为此编写程序。等待回复。谢谢你。

解决方案

你好 这个问题很酷。 你可以用这种方式分割数字。(我的意思是首先确定最后一次的数字并继续下去大约一千个) 这里是代码

展开 | 选择 | Wrap | 行号

嗨今天(2006年7月9日)我参加了对向系统的技术访谈。两轮技术面试。我在第一轮就做得很好而在另一轮做得不好。 面试官让我写一个程序打印并用文字给出数字......例如说...如果输入 12345 然后输出应打印为一万二千三百四十五。谁能帮助我如何在c中为此编写程序。等待回复。感谢您。

我认为面试官会要求你为这个问题提供逻辑becoz在面试室内写下程序这是非常困难的,无论如何我给的程序,你只需复制它,粘贴并运行,它就可以工作。

展开 | 选择 | 换行 | 行号

展开 | 选择 | Wrap | 行号

Hi today (9th july 2006) i attended a technical interview in aspire systems. Two rounds of technical interviews. i well in the first round and did bad in the other. The interviewer asked me to write a program to print and given number in words... say for example... if the input is 12345 then the output should be printed as "twelve thousand three hundred and fourty five" can someone help me how to write a program for this in c. waiting for the reply. thanking you.

解决方案

hi there well this problem is quite cool. Well u can split the number this way.(I mean first determine number at the last at once place and proceed down last thousand or so) here is the code

Expand|Select|Wrap|Line Numbers

Hi today (9th july 2006) i attended a technical interview in aspire systems. Two rounds of technical interviews. i well in the first round and did bad in the other. The interviewer asked me to write a program to print and given number in words... say for example... if the input is 12345 then the output should be printed as "twelve thousand three hundred and fourty five" can someone help me how to write a program for this in c. waiting for the reply. thanking you.

Hi, I think the interviewer would have asked you to give the logic for this question becoz writing the program inside the interview cabin for this is very difficult, anyway I am giving the program, you just copy it and paste and run, it will work.

Expand|Select|Wrap|Line Numbers

Expand|Select|Wrap|Line Numbers

更多推荐

如何用文字打印数字?

本文发布于:2023-08-07 06:58:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1317624.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何用   文字   数字

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!