C - Programming Language
This course covers the basics of programming in C. Work your way through the videos/articles and I'll teach you everything you need to know to start your programming journey!

Getting Input From Users

Lesson 12
Author : GOUP
Last Updated : September, 2020


// ints int age; printf("Enter your age: "); scanf("%d", &age); printf("You are %d \n", age);

// chars char grade; printf("Enter your grade: "); scanf("%c", &grade); printf("You got an %c on the test \n", grade);

// doubles double gpa; printf("Enter your gpa: "); scanf("%lf", &gpa); printf("Your gpa is %f \n", gpa);