Created
May 25, 2017 03:32
-
-
Save Crepu/0ac990ebce2403b8d3439b26c7d42b11 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| float f(float x){ | |
| return x*x; | |
| } | |
| float g(float c, float v, float b ){ | |
| return (c+b+v)/3; | |
| } | |
| int main(int argc, char const *argv[]) | |
| { | |
| int caca[3]; | |
| int fecha = 200410; | |
| int dia, mes, anio; | |
| for(int i=0; i<3;++i){ | |
| caca[i] = fecha%100; | |
| fecha = fecha/100; | |
| } | |
| for (int i = 0; i < 3; ++i) | |
| { | |
| cout<<f(caca[i])<<endl; | |
| } | |
| cout<< g(caca[0],caca[1],caca[2])<< endl; | |
| return 0; | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment