An app that sums up the prime numbers between two numbers

Hi, I couldnt make an app that sums up prime numbers between two numbers,
Can you help me please?

1 Like

What have you tried? Show me you work so I can help you @krsmn

(post deleted by author)

I uploaded the last thing I did in comments.

the staring and ending number , which is bigger?

It is the numbers between starting and ending thus, ending is bigger, I assumed.

I couldnt understand where is the blocks section of this app, I couldn't run the apk. Is there one, can you share that section. Thank you so much.

What is that supposed to mean? Where is the problem?

then this one should be -1

1 Like

00:59 on a Pixel 4XL (Android 12) with the APK:


That is great but I need to design it in MIT App Inventor for learning purposes, I don't need the app itself actually just the blocks section.

So again: Does my test APK work for you?

Yeah that app is nearly the same thing I am trying to do. On the front screen, I only need to see the result of the calculation tho.

Between which numbers should the prime numbers be found and added?

The numbers that the user wants actuallly, there is no spesific interval for that. Between textbox.starting and textbox.ending

My tests have shown that it can take (several) minutes for numbers between 1 and 500,000 and higher, depending on the device. Are you aware of this?

Yes, it does not matter, I will only need to see if it is working. I am not going to make it calculate high numbers.

Ok, here you go:

1 Like

I did this with other adjustments and it worked! Thank you for your assistance. I did not assume the problem was such minor.