CIS 1270 Lecture Notes - Lecture 1: Carbon-13 Nuclear Magnetic Resonance, Stamen

183 views38 pages
RAMY IBRAHIM DAHRUOG
1
MINSTRY OF HIGHER EDUCATION
HIGHER INSTITUTE OF ENGINEERING
AND TECHNOLOGY -EL- ARESH
DEPT. OF ELECTRONICS AND COMMUNICATIONS
Sheet
C++
TO
Dr : Soheir M . Afifi
Eng : Abd-Elrahman Ahmed
FROM
Student
RAMY IBRAHIM DAHRUOG
First year - Second semester
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 38 pages and 3 million more documents.

Already have an account? Log in
RAMY IBRAHIM DAHRUOG
2
Write a c++ program that input three
number from keyboard and print the
average , sum and product .
Solution
#include<iostream.h>
int main (void)
{
float x,y,z;
float avg,sum,product;
cout<<"please enter three number : "<<endl;
cin>>x>>y>>z;
avg = (x+y+z)/3;
sum=x+y+z;
product = x*y*z;
cout<<"average = "<<avg<<endl;
cout<<"sum = "<<sum<<endl;
cout<<"product = "<<product<<endl;
return 0;
}
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 38 pages and 3 million more documents.

Already have an account? Log in
RAMY IBRAHIM DAHRUOG
3
:By function
#include<iostream.h>
void man(float x,float y ,float z)
{
cout<<"enter three integer numbers : "<<endl;
cin>>x>>y>>z;
cout<<"average = "<<(x+y+z)/3<<endl;
cout<<"sum = "<<x+y+z<<endl;
cout<<"product = "<<x*y*z<<endl;
}
int main()
{
float o,p,i;
man(o,p,i);
return 0;
}
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 38 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents