Tuesday, 23 September 2014

Hackerrank Handshake solution

The Solution for hackerrank problem, Handshake using C Program.
Passed Test cases: 10 out of 10

SOURCE CODE:


 #include <stdio.h>  
 void main(){  
   int t,sk,ppl;  
   scanf("%d",&t);  
   while(t--){  
     sk=0;  
     scanf("%d",&ppl);  
     while(ppl--)  
     {  
       if(ppl>0)  
       {  
         sk+=ppl;  
       }  
     }  
     printf("%d\n",sk);  
   }  
 }  

2 comments:

  1. Last time you tell us about your problem. And now one of us are trying to solve your problem and after solve this https://www.topamericanwriters.com/essayhave-com-review/ problem we share this on the pages and that is good for me because it increase my knowledge.

    ReplyDelete
  2. Hackerrank Handshake solution is the best solution for all the readers. Readers are thinking about the ideas which are planned for the nursing assignment help working ideologies. I want to share the reality of this blog with all the new efforts and creative ideas.

    ReplyDelete