Skip to content

Instantly share code, notes, and snippets.

@sachinsaxena25
Last active July 29, 2019 08:51
Show Gist options
  • Save sachinsaxena25/465845fd754a9071d4b929591a8ab96b to your computer and use it in GitHub Desktop.
Save sachinsaxena25/465845fd754a9071d4b929591a8ab96b to your computer and use it in GitHub Desktop.
#include<stdio.h>
int main(void){
int inputNumber = 0;
printf("please enter number:");
scanf("%d", &inputNumber);
(inputNumber % 2 == 0) ? printf("number is even", inputNumber) : printf("number is odd", inputNumber);
return 0;
}
@dbc2201
Copy link

dbc2201 commented Jul 25, 2019

#include<stdio.h>

int main(void) {
	int inputNumber = 0;
	printf("please enter number:");
	scanf("%d", &inputNumber);
	(inputNumber % 2 == 0) ? printf("%d is even", inputNumber) : printf("%d is odd", inputNumber);
	return 0;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment