4 喜歡 0 不喜歡
210 瀏覽

Please write a program that receives 7 characters aweSOME in the same line. It then changes the first 3 lowercase characters into uppercase and the last 4 uppercase characters into lowercase. Kindly use a given template to finish the task.

Example(template)

#include <stdio.h>
#include <stdlib.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char *argv[]) {
	char s1,s2,s3,s4,s5,s6,s7; // You can change these declarations, it entirely depends on you.
	printf("Input your characters:\n"); // Do not change this

	// Your conditions start from here
	
	return 0;
}

Input

Input your characters:
aweSOME

Output

AWEsome

Suggestion

You may need a little help from your friendly table, here is ASCII table.

[正常] Coding (C) - 最新提問 分類:Questions Bank | 用戶: (5.9k 分)
ID: 30263 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 210 瀏覽
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.7.64
©2016-2024

相關問題

4 喜歡 0 不喜歡
0 回答
[正常] Coding (C) - 最新提問 11月 3, 2017 分類:Questions Bank | 用戶: nat236919 (5.9k 分)
ID: 30264 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 380 瀏覽
12,783 問題
183,443 回答
172,219 留言
4,824 用戶