Command Line Program for Odd Even
#include <stdio.h> int main(int argc, char *argv[]) { int number; number = atol(argv[1]); if(number % 2 == 0) printf("%d is even.", number); else printf("%d is odd.", number); return 0; }
#include <stdio.h> int main(int argc, char *argv[]) { int number; number = atol(argv[1]); if(number % 2 == 0) printf("%d is even.", number); else printf("%d is odd.", number); return 0; }
Get Hiring Updates right in your inbox from PrepInsta
Login/Signup to comment