My Math Forum  

Go Back   My Math Forum > Science Forums > Computer Science

Computer Science Computer Science Forum


Reply
 
LinkBack Thread Tools Display Modes
March 9th, 2019, 09:56 PM   #1
Banned Camp
 
Joined: Nov 2018
From: Mumbai

Posts: 32
Thanks: 1

Reverse Arithmetic progression series computer program.

Reference :

https://www.google.com/amp/s/www.gee...on-series/amp/

https://www.geeksforgeeks.org/progra...on-series/amp/


Can we write a computer program which will print the Reverse Arithmetic progression number series?

Output of the program could be :

99,96,93,90 till 3

Starting from 99 , end with 3.
Common difference : 3

Programming languages could be C,C++,Java,C#, Python etc.

Thanks & Regards,
Prashant S Akerkar

Last edited by akerkarprash; March 9th, 2019 at 10:02 PM. Reason: Content updates.
akerkarprash is offline  
 
March 10th, 2019, 05:51 AM   #2
Math Team
 
Joined: Oct 2011
From: Ottawa Ontario, Canada

Posts: 14,597
Thanks: 1038

That's already an arithmetic series: a=99, d=-3

Or can be looked at as a simple loop:
loop v from 99 to 3 step -3

Go away!
Denis is offline  
March 10th, 2019, 06:27 AM   #3
Banned Camp
 
Joined: Nov 2018
From: Mumbai

Posts: 32
Thanks: 1

Thanks.

Another example:

100,98,96,94,92,90 till 2
Start from 100, end with 2
Common difference : 2

Thanks & Regards,
Prashant S Akerkar
akerkarprash is offline  
March 10th, 2019, 06:38 AM   #4
Math Team
 
Joined: Oct 2011
From: Ottawa Ontario, Canada

Posts: 14,597
Thanks: 1038

Oh boy....BYE!!
Denis is offline  
Reply

  My Math Forum > Science Forums > Computer Science

Tags
arithmetic, computer, program, progression, reverse, series



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reverse Geometric Series computer program. akerkarprash Computer Science 9 March 10th, 2019 12:02 PM
Computer program for printing Prime numbers in reverse order. akerkarprash Computer Science 12 March 9th, 2019 01:34 PM
Some formulas of Arithmetic progression/series burgess Algebra 3 August 6th, 2014 09:58 AM
Arithmetic Progression and Geometric Progression jiasyuen Algebra 1 May 1st, 2014 03:40 AM
computer program Hoempa Computer Science 0 June 21st, 2010 05:37 AM





Copyright © 2019 My Math Forum. All rights reserved.