how to write a program which adds two numbers without using
semicolon in c

Answer Posted / g.rajitha

#include<iostream.h>
void main()
{
int a,b;
if(cout<<"Please enter two numbers : ")
if(cin>>a>>b)
if(cout<<"Sum = "<<(a+b))
}

Is This Answer Correct ?    5 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of union?

718


Why c is procedure oriented?

672


A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?

1604


Why is c used in embedded systems?

712


How can I find out the size of a file, prior to reading it in?

743






what is reason of your company position's in india no. 1.

1871


if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

1595


What is a program flowchart and explain how does it help in writing a program?

789


FILE PROGRAMMING

1868


Which is best book for data structures in c?

693


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

770


Why calloc is better than malloc?

668


Can we replace the struct function in tree syntax with a union?

890


What is the time and space complexities of merge sort and when is it preferred over quick sort?

773


What will the preprocessor do for a program?

662