You need to sign in to do that
Don't have an account?
TUSHAR KHORGADE
i am stuck in one program can anyone please sort it out
Create a map populate it with two records Odd and Even. Run a loop from 1-50, if you find a even number increase the count for even named record in map or else increase count of odd named record. Odd and even are keys, counts are values. Example map syntax: Map<String,integer> CountNumber = new map<String,Inetger>({'Even':4},{'Odd':3});
Abhinav (Salesforce Developers)
If its req is just to have count of odd and even , I think you can have a count of them firtswhilte iteratinh and then map it wit keys.