English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

3 answers

In c++

int num1, num2, total;
float average;

cout<<"Please input 2 numbers";
cin>>num1>>num2;

total=num1+num2;

cout<<"Total of two numbers"< average=total/2;
cout<<"Average of two numbers"<

2007-03-08 23:09:35 · answer #1 · answered by Jenna 3 · 0 1

What I/O libraries do you have available to you? There's also putc and getc, for example. If you can use C++ there's iostreams, i.e. cout and cin. Difficult to answer without more context.

2007-03-08 18:06:09 · answer #2 · answered by jjkleid 1 · 0 0

right it particularly is a rapid occasion to create an array: #comprise #comprise int significant(int argc, char *argv[]){ int n; int *myArr; int i; printf("Please enter the array count variety (N): "); scanf("%d",&n); myArr = (int*)malloc(n); for (i=0;i

2016-11-23 16:48:11 · answer #3 · answered by bate 4 · 0 0

fedest.com, questions and answers