I need to create a program for reading two numbers,printing them,confirming them and then summing them up.
Here is my attempt
#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
int a,b,s;
char c,d;
s=a+b;
printf("Enter any two numbers ");
scanf("%d %d" , &a, &b);
printf("The numbers you have entered are %d %d. \n\nPress c to continue " , a,b);
scanf("%c" , &d );
if (d==c) printf("\n\nThe sum of the two numbers is %d" ,s);
getch();
}
The compiler however crashes after entering 'c'..please let me know my mistake