pretty much all I am wanting to do
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
#include <iostream>
using namespace std;
int Tone(int a, int b)
{
for(int c=1;c=b;a+=4)//c is used for count
{
if(c!=b)
{
c++;
return a;
}
else
{
c++;
a = a % 13;
return a;
}
}
}
int Lens(int a, int b)
{
for(int c=1;c=b;a+=4)//c is used for count
{
if (c!=b)
{
c++;
return a;
}
else
{
a = a % 20;
return a;
}
}
}
int main ()
{
int t = Tone(3, 19);
int s = Lens(20, 19);
cout << t << ", " << s;
}
|
so...3, 20 "or 3 akbal on wikipedia" is what Im trying to find. I can do all of this on paper I just cant figure it out in code.
What 3, 20 should be returning me is 10, 12. I need to somehow get it to return me that.
the for(){if(){}} statements, to me, should be adding 4 to the a number till c(or the count) reaches b. once there I only need to figure out a % 13 where 0 = 13, and a % 20 where once again 0 is then converted to 20. if I can get this, I have the code to put to the rest of the program easy. all I need is for 3, 20 with a I-Ching reading of 19(ie the above code) to return me a number where 3, 20 is now the begining of the calendar, and 19 is the 4(10, 12+11,13+12,14+13,15) signs that make the I-Ching(19 or thunder over thunder) fit.
my thoughts are this now.
@ seeplus: thanks alot, that previous post was a little messy, I knew it didn't compile, I only wish to return designated a & b values when c = set (with b) value
I read your post, so sorry if ((c=12) or whatever) solves my problem, but this is where I am right now, and aside from small "i didn't care about anything else" mistakes...Im pretty sure I can work out the while/for/if statements if I can work out the a, b if c type statement.
@helios if 128 if statements can be done much easier than they should at least tell me how, and not tell me I only cant do it if some other program does it. a personal mayan calendar isn't too much to ask for, how can I work on building a video game possibly if I cant even do something I can do on paper? a 30gb program not working to a <500mb one working is too much to me.