C 输入一句英文句子,将句子中每个单词的第一个字母大写怎么编程
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/11 17:29:32
#include"iostream"voidmain(){chara;intflag=1;a=getchar();while(a!='.'){if(a==''){if(!flag){flag=1;co
你的for循环根本进不去,for(i=0;i
#includevoidmain(){charx[80];//声明一个数组存放字符串inti;printf("请输入英文语句\n");gets(x);//获取字符串for(i=0;x[i]!='\0'
Englishof
1.Jackdoesn'thaveanewtelescopeandamask.2.Theydon'tdotheirhomeworkathome.3.Marydoesn'tdowellinChinese
#include#includeintmain(){charstr[100];inti;gets(str);for(i=0;i
if(k==0&&a[i]122)这句有逻辑错误.a[i]不可能同时小于97和大雨122.后面那个&&应该是||.应该是这句引起的.
给一个最粗糙的版本,能实现#includemain(){\x09charstr[50];\x09inti,len;\x09printf("inputasentence:\n");\x09gets(st
#includevoidmain(){charx[100];inti;printf("请输入英语句子\n");gets(x);x[0]=x[0]-32;for(i=1;x[i]!='\0';i++){
#includemain(){charstring[81];inti,num=0,word=0;charc;gets(string);for(i=0;(c=string[i])!='\0';i++)/
C++?再问:比如说若输入:Iamastudenttotaketheexamination.,则应输出:IAmAStudentToTakeTheExamination.。再答:方法1限制单词长度:#i
1.book改为books2.has改为have3.貌似没错呀4.interested改为interesting5.many改为much6.go改为went.另外,你拼写打错了,应该是day不是dai
方法1限制单词长度:#include#include#includeintmain(){charc,*pstr;charszWord[16];while(1){pstr=szWord;while((c
1.Thedoctorsaidthatmysonwashavingahighfever.2.Ithinkthatherhandwritingisthebestinourclass.3.Heaskedw
#include#defineN9999voidmain(){chars[N];inti;printf("请输入一个英语句子:\n");gets(s);for(i=0;s[i]!='\0';i++)i
#include <iostream.h>#include "string.h"void main(){ char s
publicclasstest{\x05/**\x05*@paramargs\x05*/\x05publicstaticvoidmain(String[]args){\x05\x05//TODOAut
was interestedtoo younglots of 或plenty oftake care oftried …
#include"stdio.h"main(){char*s;intcnt=0;printf("pleaseenterthesentence\n");gets(s);while(*s){if(*s==
Whoseisthisdress?