On the computer, you could do it better, by using a proper prototype for main(), returning a value, making the variables local to main - you probably compiled this snippet with a lenient compiler and without warning switches
(for extra bonus points, check for overflow on the result of the addition)
On the Nspire, you could input strings somehow (by reading the keyboard's keys), and use, for instance, strtoul to convert the string to an integer. The NspireIO lib should save you some work, BTW