Hello, I'm new to C, can you explain a couple of things ...
#include <stdio.h> #define N 1000 // Что означает эта строка, Что такое #define и "c чем его едят" main() { int i,q; q = 0; srand(time(NULL)); for (i=0; i<N; i++) if (rand()%100 % 2 == 0) q += 1; printf("%.2f%%\n", (float)q/N * 100); // Зачем нужен такой вывод "%.2f%%"? } What is #define and “what do you eat it with?” (This is the second line of code)
What does printf print at the "% .2f %%" format string? (last line)
int main(). Usingrand()requires#include <stdlib.h>. Usingtime()requires#include <time.h>. And where did the question about "Why such a conclusion" come from? So what about no output in the program? - AnT