Divination Calendar/I-Ching Program

I am using I-Ching/Mayan(Tzolkin) calendar ,on this calendar each day the entire set up get changed for example from two sixty days today is the first day and tomorrow will be second and so on. Tzolkin is designed by 260(13X20) days and each day has its own specialty. If I randomly choose 1-64(the I-Ching) ,add two at one time and get a particular 4 of 260 to locate on on I-Ching meanings.
I am standing where right now:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <iostream>
using namespace std;

main ()
{
	for(int c=0;c<65;)
	{
		if (a<10,b<17)
		{
			for(a,b;a<10,b<17;a+=4,b+=4)
			{
				c++;
				return a, b;//so the current date is being added to
			}
		}
		else
		{
			c++;
			return a+=4-13, b+=4-20;
		}
		cout << c=1 << c=17 << c=33 << c=49;//I know this doesn't work
	}
}

What I need is to take date of Tzolkin with continuously adding to the Tones(1-13) 4 and Signs(1-20) until it approaches 65 various combinations of Tone Sign. Once I get them all I only want to get the total or c, when it approaches as 1/17/33/49.Something like  a, b come back in case of c=x for each example of a, b in case of c = 1-65. I am reading this code: https://www.theengineeringprojects.com/2020/01/form-validation-in-asp-net-core.html
Visual studio screw fails to assemble as set more than 128.
Last edited on
I see a<10,b<17 as a potential problem. You may read more about C++ operators here https://cplusplus.com/doc/tutorial/operators/ including the comma operator.

I imagine that you wanted to use either a<10 && b<17 or a<10 || b<17 instead.


main () must be changed to int main()

 
return a, b;//so the current date is being added to 

Returning a pair of values from main is not possible. You may want to print the values instead and exit the program like this:
1
2
cout << "a: " << a "\nb: " << b "\n";
return 0; //returning a zero from inside of int main is the proper way to succesfully end a program early 


 
cout << c=1 << c=17 << c=33 << c=49;//I know this doesn't work 

Then remove it?
Last edited on
Topic archived. No new replies allowed.