Skip to content

Instantly share code, notes, and snippets.

@kdmkdmkdm
Created July 9, 2013 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kdmkdmkdm/5962390 to your computer and use it in GitHub Desktop.
Save kdmkdmkdm/5962390 to your computer and use it in GitHub Desktop.
How can I run this C program?
// firstHeadsUpC.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <stdio.h>
int main ()
{
int decks;
puts("Enter a number of decks");
scanf("%i", &decks);
if (decks < 1) {
puts("That is not a vaid number of decks");
return 1;
}
printf("There are %i cards \n", (decks *52));
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment