MCPcopy Create free account
hub / github.com/SAKET-SK/Programming-Aptitude-Interview-Prep / main

Method main

TCS/Que 2/Solution.java:4–17  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

2public class Solution
3{
4 public static void main(String[] args)
5 {
6 Scanner sc=new Scanner(System.in);
7 String str=sc.next();
8 int count1=0,count2=0;
9 for(int i=0;i<str.length();i++)
10 {
11 if(str.charAt(i)=='*')
12 count1++;
13 else if(str.charAt(i)=='#')
14 count2++;
15 }
16 System.out.println(count1-count2);
17 }
18}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected