Онлайн компилятор C

#include <stdio.h> int main() { // Write your code here int a; a=10; printf("Hello world!\n"); printf("anas"); printf("the value of variable a is %d", a); return 0; }
This program prints three lines of text and the value of an integer variable.

- You declare an int variable a, assign it 10, then print it with %d, which is correct; notice that the first two printf calls end with \n but the third does not, so think about whether you want a newline at the end of the output.
- The variable a is declared and assigned in two separate steps; consider whether combining them or placing the declaration closer to its use would make the code clearer.