Printf Practice
Example: Using Format Specifiers and Variables in Printing
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; }
Tâche
Swipe to start coding
- Assign the value of
100
to 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.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 2. Chapitre 8
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Awesome!
Completion rate improved to 2.63Awesome!
Completion rate improved to 2.63
Printf Practice
Example: Using Format Specifiers and Variables in Printing
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; }
Tâche
Swipe to start coding
- Assign the value of
100
to 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.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 2. Chapitre 8
single
Awesome!
Completion rate improved to 2.63
Printf Practice
Glissez pour afficher le menu
Example: Using Format Specifiers and Variables in Printing
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; }
Tâche
Swipe to start coding
- Assign the value of
100
to 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.
Solution
Tout était clair ?
Merci pour vos commentaires !