分配:打印逆序 [英] Assignment: Print reverse order

查看:88
本文介绍了分配:打印逆序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1:编写一个程序,要求用户输入一个整数值,然后

以相反的顺序打印

样本输出

输入任意数字65564

反向65564是46556


2:编写一个程序,将一个字符串作为输入并打印在

逆序。(不要使用bulit-in / library函数)。

样本输出

输入任何字符串:im Kashif

反向

im kashif



fihsak mi

1: Write a program that asks the user to input an integer value and
print it in a reverse order
Sample Output
Enter any number 65564
Reverse of 65564 is 46556

2: Write a program that takes a string as an input and print it in
reverse order.(don''t use bulit-in/library function).
Sample Output
Enter any string: i m Kashif
Reverse of
i m kashif
is
fihsak m i

推荐答案

aa******@gmail.com 写道:
1:编写一个程序,要求用户输入一个整数值并以相反的顺序打印
示例输出
输入任意数字65564
65564的反转是46556

2:编写一个程序,将一个字符串作为输入并以相反的顺序打印。(不要使用bulit-in / library函数)。
样品输出
输入任何字符串:im Kashif
反向
im kashif

fihsak mi
1: Write a program that asks the user to input an integer value and
print it in a reverse order
Sample Output
Enter any number 65564
Reverse of 65564 is 46556

2: Write a program that takes a string as an input and print it in
reverse order.(don''t use bulit-in/library function).
Sample Output
Enter any string: i m Kashif
Reverse of
i m kashif
is
fihsak m i




那么你的问题是什么?


Robert Gamble



So what''s your question?

Robert Gamble


" aa ***** *@gmail.com" < AA ****** @ gmail.com>写道:
"aa******@gmail.com" <aa******@gmail.com> writes:
1:编写一个程序,要求用户输入一个整数值并以相反的顺序打印
示例输出
输入任意数字65564
65564的反转是46556


完成。

2:编写一个程序,将一个字符串作为输入并打印在
中逆序。(不要使用bulit-in /库函数)。
示例输出
输入任何字符串:im Kashif
反向
im kashif

fihsak mi
1: Write a program that asks the user to input an integer value and
print it in a reverse order
Sample Output
Enter any number 65564
Reverse of 65564 is 46556
Done.
2: Write a program that takes a string as an input and print it in
reverse order.(don''t use bulit-in/library function).
Sample Output
Enter any string: i m Kashif
Reverse of
i m kashif
is
fihsak m i




完成。


我不知道为什么你要我写这些程序,但我很开心

写它们。谢谢。


(也许你在找comp.lang.c.do.my.homework.for.me?)


- -

Keith Thompson(The_Other_Keith) ks***@mib.org < http:// www .ghoti.net / ~kst>

圣地亚哥超级计算机中心< *> < http://users.sdsc.edu/~kst>

我们必须做点什么。这是事情。因此,我们必须这样做。



Done.

I''m not sure why you wanted me to write those programs, but I had fun
writing them. Thanks.

(Perhaps you were looking for comp.lang.c.do.my.homework.for.me?)

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.


< aa ****** @ gmail.com>写道:
<aa******@gmail.com> wrote:
1:编写一个程序,要求用户输入一个整数值并以相反的顺序打印
示例输出
输入任何数字65564
反向65564是46556

2:编写一个程序,将一个字符串作为输入并以相反的顺序打印。(不要使用bulit -in /库函数)。
示例输出
输入任何字符串:im Kashif
反向
im kashif

fihsak mi
1: Write a program that asks the user to input an integer value and
print it in a reverse order
Sample Output
Enter any number 65564
Reverse of 65564 is 46556

2: Write a program that takes a string as an input and print it in
reverse order.(don''t use bulit-in/library function).
Sample Output
Enter any string: i m Kashif
Reverse of
i m kashif
is
fihsak m i




您已经发布了三个已分配的问题。第二个问题

以上是最简单,最清晰的问题。专注于那一个而不是甩开

左右。你知道如何将字符串读入内存吗?如果没有,请首先集中




关于清晰度的评论与上面的问题1有关。用户不知道

整数是什么,除非你告诉他。 123456789123456789是一个整数吗?

除非你告诉我,否则它确实是一个整数。请注意,人们可以阅读问题2以获得相同的含义,使用不同的数据作为问题

1.



You have posted three problems you have been assigned. The second problem
above is the easiest and clearest. Focus on that one instead of flailing
around. Do you know how to read a string into memory? If not, concentrate
on that first.

The comment about clarity relates to problem 1 above. A user has no idea of
what an integer is unless you tell him. Is 123456789123456789 an integer?
Unless you tell me otherwise it is, indeed, an integer. Note that one can
read question 2 to have the same meaning, with a different datum as question
1.


这篇关于分配:打印逆序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆