loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.05295621406928208","path":"main.c","file":{"path":"main.c","content":{"asEncoding":{"base64":"Ly8gUHJvZ3JhbSB0byBjaGVjayB3aGV0aGVyIGFuIGludGVnZXIgZW50ZXJlZCBieSB0aGUgdXNlciBpcyBvZGQgb3IgZXZlbgoKI2luY2x1ZGUgPHN0ZGlvLmg+CmludCBtYWluKCkKewogICAgaW50IG51bWJlcjsKICAgIHByaW50ZigiRW50ZXIgYW4gaW50ZWdlcjogIik7CiAgICBzY2FuZigiJWQiLCZudW1iZXIpOwoKICAgIC8vIFRydWUgaWYgcmVtYWluZGVyIGlzIDAKICAgIGlmKCBudW1iZXIlMiA9PSAwICkKICAgICAgICBwcmludGYoIiVkIGlzIGFuIGV2ZW4gaW50ZWdlci4iLG51bWJlcik7CiAgICBlbHNlCiAgICAgICAgcHJpbnRmKCIlZCBpcyBhbiBvZGQgaW50ZWdlci4iLG51bWJlcik7CiAgICByZXR1cm4gMDsKfQ=="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Program to check whether an integer entered by the user is odd or even

#include <stdio.h>
int main()
{
    int number;
    printf("Enter an integer: ");
    scanf("%d",&number);

    // True if remainder is 0
    if( number%2 == 0 )
        printf("%d is an even integer.",number);
    else
        printf("%d is an odd integer.",number);
    return 0;
}