I have another problem with command line arguments.
But this time I'm mostly convinced that it's how I've set it up.
This program takes two numbers from the command line. The first and presumably lesser number is determined to be either even or odd. If the first number is even it divides the number by 2 and if the number is odd the number is multiplied by 3 and 1 then added to it and increments a counter every time either one of these events happens until the value is 1. The smaller number is then incremented by 1 and the process starts over again until the smaller number is equal to the second presumably greater number.

This is the code that I have, it compiles OK, but I have a logical error some where causing a segmentation fault and I believe it's how I'm using the command line information (or not using it as the case maybe).

Code:
#include <stdio.h>

int main(int argc, char *argv[])
{
	int origi;
	char i, j;
	origi = i; //hold the original value of *i
	int count;
	int temp; //temporarily hold the cycle length.

	i = argv[0][1]; //Because I know where input will be I wanted to get it directly from command line
	j = argv[0][2];

	if( argc > 3)
	{
		printf("too many arguments\n");
		return 0;
	}

	for(count = 0, temp = 0; i <= j; i++)
	{
		while(i != 1)
		{
			if(i % 2)//if i is odd
			{
				i = (3 * i)+1;
				temp++;
			}
		
			else // assumes that i is even
				i = i/2;
			temp++;
		
		}
		
		if(temp > count) //stores the largest temp number into count to be printed later
		{
			count = temp;
			temp = 0;
		}
	
		printf("%d %d %d\n", origi, j, count);
		i++;
	}
	
	return 0;
}
Can see where I messed up?
Thank you.