/*logic to add two numbers in c++ without using plus operator*/
//for positive output use if condition this code will show negative output #include<stdio.h>
using namespace std;
int main()
{
int a=25,j=200,i;
for(i=0;i<j;i++)
{
a--;
}
cout<<a<<endl;
}
/* output will=> -175 */
No comments:
Post a Comment