#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
float avrg;
printf("enter the first number:");
scanf("%d",&a);
printf("enter the second number:");
scanf("%d",&b);
printf("enter the third number:");
scanf("%d",&c);
avrg=(a+b+c)/3.0;
printf("The average of given numbers is:%f",&f);
getch();
}
this c program is specifically for three variables only.
main ()
{
/* create memory spaces for variables */
int integer_one, integer_two, integer_three, integer_sum;
/* initialize variables */
integer_one = 5; integer_two = 7; integer_three = 8;
/* Sum the variables */
integer_sum = integer_one + integer_two + integer_three;
/* print the variables */
printf ("answer is %d", integer_sum);
}
---------------------------------------------------------
- Anything with /* or */ is a comment
- This 'program' allows for no input, just output. To get it interactive you'd have to use getc to get the keystrokes then add them.
#include<stdio.h>
#include<conio.h>
// Declaration of function
float add(float,float,float);
//definition of function
float add(float a,float b, float c)
{
float x;
x=a+b+c;
return x;
}
// main function
void main()
{
float a,b,c,x;
printf("Enter three numbers");
scanf("%f,%f,%f",&a,&b,&c);
x=add(a,b,c);
printf("The addition is %f",x);
getch();
}
How to write a program for mouse in microprocessor?
"Mean" usually means "average", so you just add the numbers together, then divide by 8.
Write and run a client and a server program in C-language using UDP
Yes.
write a lex program to delete space from the program
write an assembly language program to find sum of N numbers
Write your program and if you are having a problem post it here with a description of the problem you are having. What you are asking is for someone to do your homework for you. no i am asking to verify my answer
fish
How to write a program for mouse in microprocessor?
"Mean" usually means "average", so you just add the numbers together, then divide by 8.
substracion of any two number program in c
The question is malformed and incomprehensible.
Write and run a client and a server program in C-language using UDP
question clarity
write a program to print A to Z on screen in c?
write a lex program to delete space from the program
Yes.