Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- char checkCharacter(char character);
- int numberOfBrackets = 0;
- int main()
- {
- printf("0");
- char character ="";
- while(character!=EOF)
- {
- character = getchar();
- checkCharacter(character);
- }
- return 0;
- }
- char checkCharacter(char character)
- {
- if(character == '{')
- {
- numberOfBrackets++;
- }
- if(character == '}')
- {
- numberOfBrackets--;
- }
- if(character == '\n')
- {
- }
- if(character != '\n'||character != '}'|| character != '{')
- {
- putchar(character);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement