class energia
{
//atributos
double masa;
energia()
{
}//constructor
energia(double m)
{
masa=m;
}//constructor de inicializacion
void set_masa (double m)
{
masa=m;
}
double calc_ener()
{
double ener;
final double c=2997925E10;
ener=masa*(c*c);
return (ener);
}
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.