Skip to content

Instantly share code, notes, and snippets.

@richardwei6
Created October 17, 2021 03:38
Show Gist options
  • Save richardwei6/0244fad822d16c80e8fe78fa54a7405a to your computer and use it in GitHub Desktop.
Save richardwei6/0244fad822d16c80e8fe78fa54a7405a to your computer and use it in GitHub Desktop.
Coding Club C Workshop 3
#include <stdio.h>
#include <math.h>
int main(){
char a;
printf( "Enter a value: ");
a = getchar( );
printf( "\nYou entered: ");
putchar( a ); // same as printf
//
char str[100];
int i;
printf( "\n\nEnter a value: ");
scanf("%s %d", str, &i);
printf( "\nYou entered: %s %d ", str, i);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment