HELLO: Wrong answer

I am getting a wrong answer for HELLO. The logic I used was that instead of calculating for one month, I calculated it for 36 months(as that was the max validity option)and then compare the prices. The sample cases given work fine. But I guess I am missing some corner case. Please help. Thank you!

My code ::

#include <iostream>
#include <stdio.h>
using namespace std;
int main()
	int cases;
	float default_rate, callRate;
	int minsLastMonth;
	int addons;
	int validity, planCost;
	float cost;
	scanf("%d", &cases);
		scanf("%f %d %d", &default_rate, &minsLastMonth, &addons);
		float expenditure = minsLastMonth*default_rate*36;
		float maxProfit=0;
		int index=0;
		for(int i=0; i<addons; i++)
			scanf("%d %f %d", &validity, &callRate, &planCost);
			if(cost<expenditure && (expenditure-cost)>maxProfit)
		printf("%d\n", index);
	return 0;