Tuesday, 17 November 2020

C++ Program to add 2 numbers by taking input from the user.

#include <iostream>

using namespace std;

int main() 

{

int a, b,sum;

cout<<"Enter 2 numbers\n";

cin>>a>>b;

sum=a+b;

cout<<"Sum= "<<sum<<"\n";

}


No comments:

Post a Comment

Java Program to count the total number of characters in a string

 //Java Program to count the total number of characters in a string import java.util.*; public class CountChars {     public static void mai...