PROBLEM LINK:https://www.codechef.com/problems/GSRM01A Author: Omkar Prabhu DIFFICULTY:EASY PROBLEM:You have to find if inorder sum(starting from index 1 to N) at any moment, is greater than or equal to K or not. EXPLANATION:Given an array A[N] and K, start your sum from A[1] till A[N]. AUTHOR'S AND TESTER'S SOLUTIONS:Solution: http://ideone.com/hw0agC
This question is marked "community wiki".
asked 13 Oct '16, 21:24

include<stdio.h>include<conio.h>voidmain() { int a[n],k,i,sum=0; printf("enter elements"); scanf("%d",&a[i]); for(i=1;i<=n;i++) {sum=sum+a[i] } if(sum>=k) {printf("yes"); } else {printf("no); } getch(); } answered 15 Oct '16, 21:46
