Hi can you set this code the right way?
//program to convert first and last letters of each word in a string to upper case #include <stdio.h> #include <string.h> #include <stdlib.h> int invert_case(char ch); int main() { char str[50]; fgets(str, 50, stdin); int l= strlen(str); printf("input= %s\n", str); int count=0; for(int i=0; i<=l; i++){ if(i==0 || i==l-1){ invert_case(str[i]); count++; continue; } if(str[i]==32){ invert_case(str[i-1]); invert_case(str[i+1]); count++; continue; } } printf("output= %s\nnumber of times invert_case() is called= %d", str, count); return 0; } int invert_case(char ch){ if(ch>='a'&&ch<='z'){ ch= ch-('a'-'A'); } return 0; } //The output is as below input= hello how are you output= hello how are you number of times invert_case() is called= 5 //But the output expected is HellO HoW ArE YoU please help @Gen300