Categories
Uncategorized

Addition in C#

using System;
public class SumExample
{
public static void Main(string[] args)
{
int n,sum=0,m;
Console.Write(“Enter a number: “);
n= int.Parse(Console.ReadLine());
while(n>0)
{
m=n%10;
sum=sum+m;
n=n/10;
}
Console.Write(“Sum is= “+sum);
}
}

Categories
Uncategorized

Additon

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf(”

ADDITION

Enter the two number: “);
scanf(“%d%d”,&a,&b);
c=a+b;
printf(”
Sum= %d”,c);
getch();
}

Categories
Uncategorized

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!