1. 程式人生 > >9.22 (2)

9.22 (2)

col iostream blog http while ima class ios code

#include<iostream>
using namespace std;
int main(){
    int a=11,b=1,c; 
    while(a>0,b<6){
        c=a-2*b;            
        cout<<c<<endl;
        b++;
    }
    return 0;
}
#include<iostream>
using namespace std;
int main(){
    for (int a=1;a<=11;a++){
        
if(a%2==1) cout<<a<<endl; } return 0; }

技術分享



9.22 (2)