Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

C++

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include<stdio.h>
int main()
{
   int n,X=0;
   char s[100];
   scanf("%d",&n);
   for(int i=1;i<=n;i++)
   {
      scanf("%s",s);
      if(s[1]=='+') X++;
      else X--;
   }
   printf("%d",X);
}
Source by tichpx.wordpress.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
2+8 =