Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* main.c generated by valac 0.48.7, the Vala compiler
- * generated from main.vala, do not modify */
- #include <glib.h>
- #include <float.h>
- #include <math.h>
- #include <stdio.h>
- void factorial (guint32 n,
- gdouble* _result_);
- void _vala_main (void);
- void
- factorial (guint32 n,
- gdouble* _result_)
- {
- gdouble _vala__result_ = 0.0;
- if (n <= ((guint32) 1)) {
- _vala__result_ = 1.0;
- } else {
- gdouble partial_result = 0.0;
- guint32 next_n = 0U;
- gdouble _tmp0_ = 0.0;
- next_n = n - 1;
- factorial (next_n, &_tmp0_);
- partial_result = _tmp0_;
- _vala__result_ = n * partial_result;
- }
- if (_result_) {
- *_result_ = _vala__result_;
- }
- }
- void
- _vala_main (void)
- {
- gdouble _result_ = 0.0;
- guint32 n = 0U;
- gdouble _tmp0_ = 0.0;
- FILE* _tmp1_;
- n = (guint32) 5;
- factorial (n, &_tmp0_);
- _result_ = _tmp0_;
- _tmp1_ = stdout;
- fprintf (_tmp1_, "%g\n", _result_);
- }
- int
- main (int argc,
- char ** argv)
- {
- _vala_main ();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement