I am totaly new to C++, and i am trying to get sum of two digits, but i am getting some error, will somebody please correct my code.

Regards

Comments
isy try karo
#include <iostream>
#include <conio.h>

using namespace std;

int main()
{
    int a,b,sum;
    cout<<"enter first amount";
    scanf ("%d", &a);
    count<<"enter second amount";
    cin>>b;
    sum=a+b;
    printf ("sum=%d", sum);
    
	getch();
}

What error are you getting - compiler/runtime? I can see that scanf might be an issue as you don't include <cstdio> (I'm unclear if <conio.h> does that for you). Also, you are mixing input mechanisms (cin and scanf) - it is best to pick one and be consistent.

Also, you posted a code snippet. You should not post questions like these as code snippets but as new questions.

Also in line 11:
count<<"enter second amount";
It should be
cout << "enter second amount";

Comments
Nice catch :)

In addition to what the previous posters said, you may want to consider not using the identifier "sum" as a variable.

This should work (albeit untested):

#include <iostream>


using namespace std;

int main()
{
    int a, b, s;
    cout << "enter first amount";
    cin >> a;
    cout << "enter second amount";
    cin >> b;
    s = a + b;
    cout << "sum = " << s;
    std::cin.get();
    return 0;
}