Created
November 8, 2014 20:11
-
-
Save shemul/8cc5f0a1466668ff118d to your computer and use it in GitHub Desktop.
Solving != Coding [ACM]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
using namespace std ; | |
int main () | |
{ | |
const char *str = "BA BA BA BABANANA\ | |
BA BA BA BABANANA\ | |
BANANA NA AHH, POTATO NA AH AH BANANA AH AH\ | |
TO GA LI NO PO TAH TO NI GAH NI BAH LO BAH NI KAH NO JI GAH BA BA BA BABANANA.\ | |
YO PLANO HU LA PA NO NO TU MA BANANA LIKE A NUPI TALAMOO\ | |
BANANA BA BA BABANANA BA BA BA BABANANA\ | |
POTATO HO HOOOOOO\ | |
TO GA LI NO PO TAH TO NI GAH NI BAH LO BAH NI KAH NO JI\ | |
GAH BA BA BA BABANANAAAAAAAAA\ | |
DHISYAAAAAA"; | |
int counter = 0 ; | |
int i = 0 ; | |
while(str[i]!='\0') | |
{ | |
if(str[i]=='A') | |
{ | |
counter++; | |
} | |
i++; | |
} | |
cout << counter ; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment