Warning: Declaration of action_plugin_changes::register($controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /volume1/web/dokuwiki/lib/plugins/changes/action.php on line 0 Warning: Declaration of syntax_plugin_code::handle($aMatch, $aState, $aPos, &$aHandler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /volume1/web/dokuwiki/lib/plugins/code/syntax.php on line 42 Warning: Declaration of syntax_plugin_code::render($aFormat, &$aRenderer, &$aData) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /volume1/web/dokuwiki/lib/plugins/code/syntax.php on line 42 c_quizz1 [Protocol Engineering Lab.]

User Tools

Site Tools


c_quizz1
#include <stdio.h>
 
int main(void) {
    int i;
    int sum = 0;
    int input;
 
    printf("your input needed:");
    // scanf("%d", &input);
    input = 9;
 
    if(!(input % 2 == 0)) {
        for(i = 0; i <= input; i++) {
            sum += i;
        }
 
    printf("result: %d\n", sum + input);
    }
 
    else
        printf("Odd needed, ^^;");
 
    return(0);
}
c_quizz1.txt · Last modified: 2015/03/30 16:56 by jonghyouk