找了好久。。。#include "stdafx.h"#include <iostream>using namespace std;int main(){ int a=0,b=0,n; cout<<"Please enter some integers (enter 0 to quit):"<<endl; cin>>n; while(n!=0) { ?if(n>0) { ?a++; ?} ?else{ ?b++; } ?cin>>n; } cout<<"Count of positive integers: "<<a<<endl; cout<<"Count of negative integers: "<<b<<endl; return 0;}
不到20行,哪個(gè)朋友來幫忙找錯(cuò)誤。
慕工程3352311
2016-10-04 10:14:30