Skip to content

Programming Posts

a blog by Sameer

Search for:
  • Home
  • Programs
    • Algorithms & Flowcharts
    • C Programs
    • TechwordsInfo
    • C#.Net
    • C# Programs With Output
    • C# WinForms
    • VB.Net
    • VB.Net Console Programs
    • Java Programs
    • .NET
    • ReusableDotnetBlocks
  • Web Development
    • Asp.Net
    • Asp.Net MVC
    • CSS
    • JQuery
  • Others
    • ADO.NET
    • BLOGGER
    • Blogging
    • Email
    • Outlook
    • Google
    • Sap Business One Software Development Kit
    • TechwordsInfo
    • SQL SERVER
    • WordPress
    • Visual Studio
    • Uncategorized
  • About
  • Downloads
  • Contact Me

C PROGRAM TO ADD TWO NUMBERS WITHOUT USING THIRD VARIABLE

  • Posted on: 22/07/2013 22/07/2013
  • Categories: C Programs

 

C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include<stdio.h>
int main()
{
int x,y;
printf(" **** www.ProgrammingPosts.com *** ");
printf(" >>> PROGRAM TO ADD TWO NUMBERS WITHOUT USING THIRD VARIABLE <<< ");
printf("n Enter the first number to be added: ");
scanf("%d",&x);         /* taking x value from keyboard*/
printf("n Enter the second number to be added: ");
scanf("%d",&y);         /* taking y value from keyboard*/
     x = x + y;     /*assining the value of sum of x and y to x*/
 
printf("n The sum of two numbers is: %dn",x);    /*printing the sum.*/
return 0;
}

Post navigation

Previous Previous post: VB.NET PROGRAM TO ADD TWO NUMBERS / INTEGERS USING FUNCTION
Next Next post: IS .NET PLATFORM DEPENDENT OR PLATFORM INDEPENDENT ?

Sameer Shaik

184RSS Feed

Programming Posts




© 2025 Programming Posts. Proudly powered by WordPress. WordStar, Theme by Linesh Jose, Modified by Sameer Shaik