+ 1

How to determine Average if some EditText are not fill?

I want to develope an application which calculate some entries. But if there is one or more empty EditText so it does not crash. And calculate the length of fill entry only.

7th Jul 2018, 9:34 AM
Bashir Ahmad
Bashir Ahmad - avatar
6 odpowiedzi
+ 1
what about counting?
7th Jul 2018, 10:46 AM
Bashir Ahmad
Bashir Ahmad - avatar
+ 1
I want to create an app which calculates average. There should 10 EditText available. but if I put only 6 entries, so it calculate only those which are fill like "Sum of entries divide by6"
7th Jul 2018, 10:53 AM
Bashir Ahmad
Bashir Ahmad - avatar
+ 1
Use a int variable for track how many EditText value are not empty and for any not empty EditText add calculate the sum. At end divide this sum by the track int variable
7th Jul 2018, 10:57 AM
KrOW
KrOW - avatar
+ 1
can you plz code it?
7th Jul 2018, 10:58 AM
Bashir Ahmad
Bashir Ahmad - avatar
0
You cannot ignore they or make they value as 0?
7th Jul 2018, 10:39 AM
KrOW
KrOW - avatar
0
Bashir Ahmad Can you explain better your problem?
7th Jul 2018, 10:47 AM
KrOW
KrOW - avatar