Daily Challenge #84

Hi :slightly_smiling_face:
Finally the day came which I was waiting for weeks :grin:
Although I wanted to make 85th DC but no one posted 84th DC so I have to post it.
Today’s challenge is to make a procedure which takes

a - initial value
d - common difference
f - number of terms

as input (int) and returns the terms of A.P.(arithmetic progression) in CSV format.
Something like this:


Note: 1.Number of blocks does not matters.You can use as much blocks as you want but don’t compromise with speed and accuracy :grinning:
2.number of terms means next n number of terms.First number is the initial value and you have to find next n terms of A.P

Arithmetic Progression is 5th chapter of my Math’s book which I have read today in the morning :sweat_smile:

I've given it a try!
1 Like

I have almost solved the challange
One dout If the no. Of terms is 5 then why the o/p is 6.

I am not so good in maths :grin::roll_eyes:


Oops…my mistake :sweat_smile:
I forgot to mention that number of terms means next n number of terms.
First number is the initial value and you have to find next n terms of A.P.


Noooo! I missed it. I think I still have time.


It’s 10:06 in EU. And you’re saying

Well, for me, the DC has just began! :rofl:


Here is mine


My blocks


@dora_paz the output should be is csv format. See the first post.

Btw, here is mine :slight_smile:

My solution

Total block = 18

Proof of functionality:


Here is my solution:

Well done guys :clap:
Everyone has posted unique and correct solution so it was quite hard for me to choose the best solution.
But since @Fabio posted the correct solution first so I think he deserves this :white_check_mark: Green Tick :slightly_smiling_face:


So we have to compete who is faster rather than who has the best answer?

1 Like

No , not at all.
You have to compete to post the best solution.
As I said

But I can’t mark everyone’s post as solution so I thought to go with his solution.
Everyone’s solution was best and I appreciate your work :clap:


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.