int Units;
void input(int i) {
char temp[50];
printf("Enter class id for #%d > ", i + 1);
readLine(ClassID);
printf("Enter Name for #%d > ", i + 1);
readLine(ClassName);
printf("Enter Description for #%d > ", i + 1);
readLine(Description);
printf("Enter pre-reqs for #%d > ", i + 1);
readLine(PreReqs);
printf("Enter units > ");
readLine(temp);
// Write a method to convert String temp into an integer and store it in the Units field
我想我需要使用嵌套循环做一些事情,但我不确定如何进行转换请帮助。