Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Printf-Harjoitus | Tietotyypit ja Muuttujat
C:n Perusteet

bookPrintf-Harjoitus

main.c

main.c

copy
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; }
Tehtävä

Swipe to start coding

  • Aseta arvo 100 muuttujaan nimeltä intVariable.
  • Valitse sopiva tietotyyppi muuttujalle charVariable.
  • Käytä printf()-funktiota näyttääksesi molempien muuttujien arvot yhdellä kutsulla.

Ratkaisu

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 2. Luku 8
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

Suggested prompts:

Can you explain this in simpler terms?

What are the main points I should remember?

Can you give me an example?

close

Awesome!

Completion rate improved to 2.63

bookPrintf-Harjoitus

Pyyhkäise näyttääksesi valikon

main.c

main.c

copy
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; }
Tehtävä

Swipe to start coding

  • Aseta arvo 100 muuttujaan nimeltä intVariable.
  • Valitse sopiva tietotyyppi muuttujalle charVariable.
  • Käytä printf()-funktiota näyttääksesi molempien muuttujien arvot yhdellä kutsulla.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 2. Luku 8
single

single

some-alt