Hello I am very new to C but have some experience with python and would like to know how to print the outputs for the credit.c so I know what I am dealing with. I have this code and when I get to the print statement I have an error and do not know how to fix this in C. This would be nice to debug easier.
#include <stdio.h>
#include <cs50.h>
int main(void) { long long int input, total;
#include <cs50.h>
int main(void)
{
long long int input, total;
do
{
input = get_long_long();
}
while(input < 0);
total = input % 10;
printf(total);
I get the error --credit.c:15:12: error: incompatible integer to pointer conversion passing 'long long' to parameter of type 'const char *' [-Werror,-Wint-conversion]-- It
--credit.c:15:12: error: incompatible integer to pointer conversion passing
'long long' to parameter of type 'const char *' [-Werror,-Wint-conversion]-
-
It would be cool to figure this out so I am sure I know exactly what my code is doing. -Thanks