Newb Question: scanf() in C
- by riemannliness
So I started learning C today, and as an exercise i was told to write a program that asks the user for numbers until they type a 0, then adds the even ones and the odd ones together. Here is is (don't laugh at my bad style):
#include <stdio.h>;
int main() {
int esum = 0, osum = 0;
int n, mod;
puts("Please enter some numbers, 0…