Printf Practice
main.c
123456789101112#include <stdio.h> int main() { int iVariable = 832; float fVariable = 54.984; char cVariable = '#'; printf(" iVariable = %d \n fvariable = %f \n cVariable = %c \n", iVariable, fVariable, cVariable); return 0; }
Opgave
Swipe to start coding
- Assign the value of
100to the variable namedintVariable. - Choose an appropriate data type for the variable
charVariable. - Utilize the
printf()function to display the values of both variables in a single call.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 2. Kapitel 8
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Suggested prompts:
Can you explain this in simpler terms?
What are the main points I should remember?
Can you give me an example?
Awesome!
Completion rate improved to 2.63
Printf Practice
Stryg for at vise menuen
main.c
123456789101112#include <stdio.h> int main() { int iVariable = 832; float fVariable = 54.984; char cVariable = '#'; printf(" iVariable = %d \n fvariable = %f \n cVariable = %c \n", iVariable, fVariable, cVariable); return 0; }
Opgave
Swipe to start coding
- Assign the value of
100to the variable namedintVariable. - Choose an appropriate data type for the variable
charVariable. - Utilize the
printf()function to display the values of both variables in a single call.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 2. Kapitel 8
single