Skip to content

Latest commit

 

History

History
18 lines (18 loc) · 522 Bytes

three_int_sum.md

File metadata and controls

18 lines (18 loc) · 522 Bytes

https://www.youtube.com/watch?v=lkW5PlJnEo4&list=PLY_qIufNHc293YnIjVeEwNDuqGo8y2Emx&index=17

#include <stdio.h>
int main(){
    int n1,n2,n3;
//    int total;
    printf("Enter the first integer:");
    scanf("%d",&n1);
    printf("Enter the second integer:");
    scanf("%d",&n2);
    printf("Enter the third integer:");
    scanf("%d",&n3);
//    total=n1+n2;
//    printf("Sum is %d.",total); //use Ctrl + Shift + C to comment out
    printf("The sum of these three integers is %d.",n1+n2+n3);
    return 0;
}