Well hello all, I am new to this forum and this is my first post!
I just started learning some C with a 7-days/lessons e-book and I completed the first lesson. So at the end, they asked to compose a program of our own which would basically do something like : c=a+b (2+3=c=5), you see...
I needed to make something useful to me, so I immediatly went with * and /.
If someone wants to test it, it compiles, but the results aren't quite fitting the equation (so far).
Thank you!
Code:
#include <stdio.h>
main() //This program is to calculate a certain DELAY value for a given tempo
{
int e,m,x,y;
printf("Enter value for x :"); //That would be the BPM's
scanf("%d",&x); //I enter let's say.. 120PBM
y=m/x; //I need to divide a minute by the BPM's value
m=60; //Here is where I define the value of a minute in seconds
e=y/2; //E is the result I want (The result of the 1st equation above divided by 2)
printf("Echo = %d\n",e);
system("pause");
}