一个大问题 [英] a big problem

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

问题描述

有一个问题:


编写一个程序,在执行时会将屏幕上的每个资本

字母转换为小写字母和每个小字母大写字母

到大写字母。程序应该停止用户点击键盘的动作

a键盘。


我有 ;让我们C书和这个问题在第278页,我尽我所能

但直到现在都无法做到,任何人都知道该怎么做。

thankx和genious我会说谁会这样做

there is a question:

write a program which when executed would keep coverting every capital
letter on the screen to small case letter and every small case letter
to capital letter.The procedure should stop the movement the user hits
a key from keyboard.

I had "Let us C" book and this question on page 278, I m trying my best
but unable to do till now, any one knows what to do.
thankx and genious i will say who will do it

推荐答案

ash写道:
有一个问题:
键盘上的一把钥匙。


这不是一个问题,它是一个家庭作业...

我有让我们C书和这个问题在第278页,我尽我所能
但直到现在都无法做到,任何人都知道该怎么做。
感谢和天才我会说谁会这样做
there is a question:

write a program which when executed would keep coverting every capital
letter on the screen to small case letter and every small case letter
to capital letter.The procedure should stop the movement the user hits
a key from keyboard.
It is not a question, it is a homework...
I had "Let us C" book and this question on page 278, I m trying my best
but unable to do till now, any one knows what to do.
thankx and genious i will say who will do it




向我们展示你做过的最好的,有人会指导你...



Show us the best you did and someone will guide you...


ok

有一些代码


#include< stdio.h>

#include< dos.h>


main()

{

char far * scr = 0xB8000000;

int i

while( !kbhit())

{

for(i = 0; i< = 3999; i + = 2)

if(scr [i ]> =''A''& 7 scr [i]< =''Z'')

{

scr [i] + = 32;

}

其他

{

if(scr [i]> ='''''& ;& scr [i]< =''z'')

{

scr [i] - = 32;

} }

}}


这是它的答案但是当我运行这个程序时我什么也没发生

turbo C ++ 3.1

i没有尝试过o做我的功课我的朋友很有意思

ok
there is some code

#include<stdio.h>
#include<dos.h>

main()
{
char far *scr=0xB8000000;
int i
while(!kbhit())
{
for(i=0;i<=3999;i+=2)
if(scr[i]>=''A'' &7 scr[i]<=''Z'')
{
scr[i]+=32;
}
else
{
if(scr[i]>=''a''&&scr[i]<=''z'')
{
scr[i]-=32;
}}
}}

this is its answer but when i run this program nothing happened i have
turbo C++ 3.1
i was not trying to convience for doing my homework my friends


Turbo C ++ 3.1,哦,一个已经过时的IDE了。

嗯,你犯了一些字面上的错误,我在//之后标记了它们


#include< stdio.h>

#include< dos.h>

main()

{

char far * scr = 0xB8000000; //编译消息show" warning"

int i //分号错过

while(!kbhit())//它可以使exe文件陷阱死回收

{

for(i = 0; i< = 3999; i + = 2)

if(scr [i]> = ''A''& 7 scr [i]< =''Z'')//数字7应该删除

{

scr [i] + = 32;

}

其他

{

if(scr [i]> ='' a''&& scr [i]< =''z'')

{

scr [i] - = 32;

}}

}}


虽然我成功编译了它,但这不是一个正常的程序。我将在稍后检查它。

Turbo C++ 3.1, Oh, an IDE which has been out of the day yet.
Hmm, you''ve made some literal mistakes, I marked them after "//"

#include<stdio.h>
#include<dos.h>
main()
{
char far *scr=0xB8000000; //the compile message show "warning"
int i // semicolon missed
while(!kbhit()) // it can make the exe file trap in dead recycling
{
for(i=0;i<=3999;i+=2)
if(scr[i]>=''A'' &7 scr[i]<=''Z'') // the digit 7 should be delete
{
scr[i]+=32;
}
else
{
if(scr[i]>=''a''&&scr[i]<=''z'')
{
scr[i]-=32;
}}
}}

Although I compiled it succeefully, it''s not a normal program. And I
will examine it later.


这篇关于一个大问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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