当前位置:网站首页>B1009 irony
B1009 irony
2022-06-29 02:07:00 【Moliay】
Give me an English sentence , Ask you to write a program , Reverse the order of all the words in the sentence .
Input format :
The test input contains a test case , The total length given in one line does not exceed 80 String . A string consists of several words and spaces , The words are made of English letters ( There is a distinction between case and case ) Composed string , Use... Between words 1 Separate the spaces , Type to make sure there are no extra spaces at the end of the sentence .
Output format :
The output of each test case takes up one line , Output the sentences in reverse order .
sample input :
Hello World Here I Come
sample output :
Come I Here World Hello
idea
- Note that no space is required at the end , Otherwise, the format is wrong
solution
#include <stdio.h>
int main(){
char m[81][81];
int num = 0;
while(scanf("%s", m[num]) != EOF){
num++;
}
for(int i = num - 1; i >= 0; i--){
printf("%s", m[i]);
if(i > 0)
printf(" ");
}
return 0;
}
边栏推荐
- Business system anti-virus
- How to become a senior digital IC Design Engineer (6-6) digital IC Verification: system level simulation
- Stm32l4xx serial port log configuration analysis
- Google Borg论文
- 【内网穿透】Frp 自建跳板-两个内网通讯上线-反弹shell
- TiFlash 面向编译器的自动向量化加速
- Blog publishing test 3
- e. Difference between target and e.currenttarget
- How to manage device authorization
- How to encrypt anti copy program
猜你喜欢

The left toolbar of hbuilder is missing
![[high concurrency, high performance and high availability of massive data MySQL practice-10] - Implementation of mvcc in InnoDB](/img/dc/a30ccd9943e668aef8c874980a4975.jpg)
[high concurrency, high performance and high availability of massive data MySQL practice-10] - Implementation of mvcc in InnoDB

【Redis】List类型

Exclusive analysis | real situation of software test about resume and interview

Flex application: realize two rows and five columns of data, self-adaptive

【Redis】Key的层级结构

Business system anti-virus

Analysis of sending principle of OData metadata request for SAP ui5 application

Analysis of advantages and disadvantages of environment encryption and transparent encryption

How to become a senior digital IC Design Engineer (4-3)
随机推荐
SystemVerilog-结构体(一)
为什么建议大家尽可能选择自研公司
[redis] sortedset type
[C language] Fibonacci sequence and frog jumping steps (the most detailed elementary frog jumping steps)
什么叫股票线上开户?网上开户安全么?
Is the ETF fund reliable and safe
[high concurrency, high performance and high availability of massive data MySQL practice-10] - Implementation of mvcc in InnoDB
MySQL详解 --- 聚合与分组
Crawler exercise (IV) -- IP address problem
基于 FPGA 的 RISC CPU 设计(4)关于项目的 36 个问题及其答案
PHP hospital network reservation management system source code, hospital consultation reservation registration OA system (commercial or graduation design)
Scala 基礎 (三):運算符和流程控制
[MySQL practice of high concurrency, high performance and high availability of massive data -9] - transaction concurrency control solutions lbcc and mvcc
Ambiguity between 0 and 1
[从零开始学习FPGA编程-50]:视野篇 - 芯片是如何被制造出来的?芯片制造的十三大步骤。
如何成为一名高级数字 IC 设计工程师(6-7)数字 IC 验证篇:DEBUG 技巧
Near consensus mechanism
Server antivirus
大三下期末考试
Junior final exam