1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Answer for Arjen

Discussion in 'C++' started by AHA1376, Oct 21, 2010.

  1. AHA1376

    AHA1376 New Member

    Joined:
    Oct 14, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    this is the program you Wanted
    Code:
    #include "stdafx.h"
    #include "iostream"
    #include "stdlib.h"
    #include "conio.h"
    using namespace std;
    void main()
    {
    	int a;
    	static int m=0;
    	cout<<"input <n> (integer): ";
    	cin>>a;
    	cout<<"\n";
    	for(int i=1;i<(a+1);i++){
    		if(i%3==0){
    			if(i%2==0){
    				cout<<i<<" ";
    				m=m+1;
    			}
    		}
    	}
    	cout<<"\n number of them= "<<m;
    	cout<<"\n program by AHA";
    	getch();
    }
    mail ME AHA1376@gmail.com Good Luck ;)
     
  2. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    2
    Trophy Points:
    0
    Which answer and who wanted?
     
  3. techgeek.in

    techgeek.in New Member

    Joined:
    Dec 20, 2009
    Messages:
    572
    Likes Received:
    19
    Trophy Points:
    0
    Occupation:
    EOC (exploitation of computers)..i m a Terminator.
    Location:
    Not an alien!! for sure
    Home Page:

Share This Page