0 like 0 dislike

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.

[Exercise] Coding (C) - asked in Chapter 3: Branching, Looping and Functions by (5.9k points)
Available when: Unlimited - Due to: Unlimited
| 185 views

13 Answers

0 like 0 dislike
Hidden content!
** ** * * **
** * *** ** *

* *** * ** * * ** * or * * * * ** * * ** *** ** * or *** ** * */

* * *** ** * {
** * ** **** * * ** * ** **
* ** * **
*** ** ***** = **
* ** * * * * = *** **
** ** **** ** ** = * * * *
* ** * ** a4 = ** ***
** * ** *** * = *** *
****** * *** = * *** *
** * * = * *

** ** ** ***
* == * **** * * a2 == *** ** == * * * a4 == * * * a5 == * * * **** a6 == *** ** * *** a7 == )
* ***** ** * ** * * ** * ** * * * ** + **** ** - + * - ** * * * + * - * * - *** - * - ** - ** - * * - * - * - *** *
* *
* ** *** * * * ** * *
* *** *** *** *
100/100 answered by (252 points)
0 0
Case 0: Wrong output
0 like 0 dislike
Hidden content!
* * * * * **** ** *
* ** * ** *

/* run this * the * * * * or add your own * ** * * ** ** ***** ** or * * * loop */

int * * **** char * * {
* * * * * * char * *** *

** * * ** ** your ** ** * **
** * ** q = * ***
**** ** * w = ****
** * ** * e = ** ****
* * ** * * * * *** r = **
* * * * t = * *
* * * * y = *** *
* * *** * *** u = *** *


*****
* ** * **
*** * ** **

** ** if( q **** 'a' ** * **** q ** 'z' )
* * * *** ** * ** * ** * * ** ** ** * q + * ** - *
* * *** * *** *** *** if( w ** * 'a' ***** ** * w * * 'z' )
* * * ** ** * * ** * * * * w + * ***** - ***
* * * * ** *** if( e ** 'a' * * * e ** * 'z' )
*** * ** *** * ** **** *** e + * * * - * * *
* * * * * * **** if( r * 'A' * *** ** * r * 'Z' )
*** * ** *** * * * **** * * * ** r - ** ** * - *****
**** * * * *** ***** if( t * *** 'A' *** * ** * t *** 'Z' )
* * * * * * * ** * ** * * **** ** ** *** ** t - * - * *
** ** *** * * **** *** if( y * * 'A' ** *** ** y * *** 'Z' )
** * ***** ** ** * * * * * * * * * y - ***** * ** - **
** * * * * ** * * * if( u ** 'A' * * ** * u ** * 'Z' )
* * *** * ** * * * * *** * * * * * u - ** * * - *
**** ** * * **** ** * *
**** *** * ** * *

** *
* *** 0;
}
100/100 answered by (268 points)
0 1
Case 0: Wrong output
0 like 0 dislike
Hidden content!
* ** ** * * * *
* * * ***** * *

/* run this ** * using the * * pauser or add your own getch, ** ** ** * ** ** * ** or input loop */

int * argc, char * * {
***** * * char s[7];
* * * * int i;
** ** * * ** * ** * ** ** your * **
** **** * **
* * ** **** * *** * *** *
* * *** * * * * *** ** * if * *
* * * ** * *** * * ** ** * * * ** ***** **** * *** * ***** **
** * * *** ** ** * * ** * * * * s[i] += **
* ** ** * * * ** * * * }else {
** **** * *** * *** * * ** *** * *** * *
*** ** * * *** * ***** s[i] -=
* * * * ** *** * * }
* * **** }
***** *** * * * * * * * **
***** * * ** * *** **
** ** ** **** ** ** * * * ** **** ** ** *
*** * ** * * }
* * * **
** * * * ** ** return 0;
}
answered by (5.9k points)
0 0
Case 0: Correct output
Get it on Google Play Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:173.245.54.235
©2016-2020

Related questions

0 like 0 dislike
17 answers
[Exercise] Coding (C) - asked Oct 27, 2017 in Chapter 3: Branching, Looping and Functions by nat236919 (5.9k points)
Available when: Unlimited - Due to: Unlimited
| 277 views
0 like 0 dislike
24 answers
[Exercise] Coding (C) - asked Nov 2, 2017 in Chapter 3: Branching, Looping and Functions by nat236919 (5.9k points)
Available when: Unlimited - Due to: Unlimited
| 257 views
0 like 0 dislike
20 answers
[Exercise] Coding (C) - asked Nov 2, 2017 in Chapter 3: Branching, Looping and Functions by nat236919 (5.9k points)
Available when: Unlimited - Due to: Unlimited
| 217 views
1 like 0 dislike
23 answers
[Exercise] Coding (C) - asked Oct 20, 2017 in Chapter 3: Branching, Looping and Functions by nat236919 (5.9k points)
Available when: Unlimited - Due to: Unlimited
| 584 views
10,159 questions
107,472 answers
92,558 comments
3,254 users