Hi, please can someone help me with this.(adsbygoogle = window.adsbygoogle || []).push({});

I want to write afunction sequence in Cthat returns 1 when a set of 5 cards appear in sequence ; 0 if not.

I dont understand very well what to do here.

the sequence is 2,3,4,5,6,7,8,9,10,jack,queen,king, with ace considered as either before 2 or after king as needed

For example the set of cards( given as follow):

two of diamonds

four of clubs

six of hearts

three of hearts

five of spades

must have sequence =1;

but for the set of cards:

two of spades

king of spades

ace of clubs

three of diamonds

five of hearts

must have sequnce =0

I give this second example since I do not understand why the sequence is 0 here.

Can someone explain me what sequence means and give me some suggestions to write the function called sequence??

Please do not use structure

Thank you for your time.

B

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# What sequence means and give me some suggestions

Loading...

Similar Threads for sequence means suggestions | Date |
---|---|

C/++/# Fibonacci sequence problem C# | Aug 2, 2015 |

Fortran DO loop sequence confusion | Apr 25, 2014 |

Problems generalizing a number sequence | Apr 28, 2013 |

Shutdown sequence initialisation | Mar 30, 2013 |

**Physics Forums - The Fusion of Science and Community**