Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- #include <stdbool.h>
- /**
- * Objective:
- * Declan: Who the hell are you?
- *
- * Walt: You know. You all know exactly who I am. Say my name.
- *
- * Declan: What? I don't have a damn clue who the hell you are.
- * Walt: Yeah, you do. I'm the cook. I'm the man who killed Gus Fring.
- *
- * Declan: Bullshit. Cartel got Fring.
- *
- * Walt: Are you sure? That's right. Now. Say my name.
- *
- * Declan: You're ............ ?
- *
- * Entrée:
- * Heisenberg
- *
- * Sortie:
- * 4
- *
- * Contraintes:
- * Tip: output the count of letters 'e' case independently plus one
- *
- * Exemple:
- * Entrée:
- * Heisenberg
- * Sortie:
- * 4
- */
- int main()
- {
- char x[10001];
- scanf("%[^\n]", x);
- int result = 0;
- for (int i=0; i<strlen(x); i++) {
- if (x[i] == 'e' || x[i] == 'E') {
- result++;
- }
- }
- printf("%d\n", result+1);
- return 0;
- }
Add Comment
Please, Sign In to add comment