Recent Posts

Monday 8 January 2018

addtion program in C

In the previous tutorial we learn about simple program How to write Hello world in 'C'.and in this post we will learn how to sum two numbers in c programming language.In this tutorial you will get simple addition of two numbers.user will input two numbers and the sum is calculated and printed on the screen.

Addition program in C:


#include<stdio.h>
#include<conio.h>
main()
{
int a,b;
clrscr();
printf("enter two number");
scanf("%d%d",&a,&b);
printf("\n sum=%d",a+b);
getch();
}

Output:
enter two number: 5 5
sum: 10

0 comments:

Post a Comment

Followers

Popular Posts

Categories

social media

Text Widget

Powered by Blogger.

About Me

My name is junaid khan and i am a full time blogger and author of a blog tutorial called tutorialpointsolution.

String function

In the previous post we learn about what is String .we know that string is a collection of two or more characters.In string we can store al...

Search This Blog

Technology

Adbox

Recent Post

Breaking

Recent In Internet

Comments

Facebook

Pages

Comments

Pages

Recent

Pages

Technology