- 1

can any one tell

they that tray u are self like this #include <iostream> using namespace std; int; () { int << A =10; int << b = 30; sum>> a+b return 0; } so then i click on start and they saying some thing error and not anwseeing me

20th Jul 2017, 10:34 AM
shahid jani
4 Respostas
+ 1
ok
20th Jul 2017, 10:47 AM
shahid jani
0
what is this "int;()"... if it is a function remmove ; from it i.e int()... in that case it will always return zero...if u are making a function for sum...name it as sum and return sum at last...
20th Jul 2017, 10:42 AM
Naveed Jeelani Khan
Naveed Jeelani Khan - avatar
0
like this #include <iostream> using namespace std; sum () { int << a =10; int << b = 30; int sum>> a+b return sum; }
20th Jul 2017, 10:54 AM
Naveed Jeelani Khan
Naveed Jeelani Khan - avatar
0
or if you want to pass arguments : sum (int a, int b) { int sum>> a+b cout<<"the sum is:"<<sum return sum; } sum(1,2) will give 3 as output
20th Jul 2017, 10:57 AM
Naveed Jeelani Khan
Naveed Jeelani Khan - avatar