Created
March 20, 2015 18:02
-
-
Save mmikhan/816ac78bec189926d55d to your computer and use it in GitHub Desktop.
Display the result of a number is even or odd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// main.c | |
// midterm | |
// | |
// Created by Md Mazedul Islam Khan on 3/20/15. | |
// Copyright (c) 2015 Md Mazedul Islam Khan. All rights reserved. | |
// | |
#include <stdio.h> | |
int main(int argc, const char * argv[]) { | |
// insert code here... | |
int input; | |
scanf("Please insert an number %d: ", &input); | |
if (input % 2 == 0) { | |
printf("The number is even"); | |
} else { | |
printf("The number is odd"); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment