0

Assignment

I am stuck here with my assignment: Need help! Q. This isss a House // this isss a house // thith ithth a houthe Hint: -can't use string s or ss ==> th while(ch!="\n") { ch = getchar(); ch = tolower(ch); putchar(ch); .... and here's my attempt: . . #include<stdio.h> void main() { char ch; while(ch!='\n') { ch = getchar(); ch = tolower(ch); /* if(ch == 's') { ch = 't'; } */ putchar(ch); } return 0; }

6th Nov 2019, 3:22 PM
Kaisang Tamang
Kaisang Tamang - avatar
1 Resposta
0
What error you getting? ->make these changes. 1)Change void main() to int main() . ( remove return 0; ) 2)Must end input by enter key. 3)Un-comment if block
6th Nov 2019, 4:08 PM
Jayakrishna 🇮🇳