C++ Input Output

C++的IO比较复杂,记录一下碰到的问题:

#include "stdafx.h"
#include <iostream>

using namespace std;

int main(int argc, char* argv[])
{
    cout << 22/5*3 << endl;
    printf("Hello World!\n");
    return 0;
}

居然输出整数12,而不是浮点数

posted @ 2014-05-22 23:37  findumars  Views(560)  Comments(0)    收藏  举报