ok so tossed out last little project cuz professor said it would be alittle much an he wanted me to be able to do it at end of semester instead of a program to do it for me lol so my new fun little project is yet to be determined, however i know i will need to take in a string and put each digit of it into an array not really sure how to take this one but what ive guessed to far was to try and declare each int. as it was scanned in but that doesn't seeem to be working, how can i go about this??
Code:
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
float a,b[4],c;
int main(void)
{
printf("Enter string up to 5 digits\n");
scanf("%s", &b[4]);
printf("\n1st: %d", b[4]);
printf("\n2nd: %d", b[3]);
printf("\n3rd: %d", b[2]);
printf("\n4th: %d", b[1]);
printf("\n5th: %d", b[0]);
return 0;
}