DSPS: Table of 3
//============================================================================
// Name : 3_table.cpp
// Author : Parashar
// Version :
// Copyright : Do not try this at home ;P
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
using namespace std;
class table
{
public:
void process();
};
void table::process()
{
int c,i,n;
cout<<"enter the no.s till u want to see table of 3";
cin>>n;
for(i=0;i<=n;i++)
{
c=i%3;
if(c==0)
{
cout<<i<<endl;
}
}
}
int main()
{
cout << "!!!Made by PARASHAR!!!" << endl; // prints !!!Made by PARASHAR!!!
table p;
p.process();
return 0;
}
// Name : 3_table.cpp
// Author : Parashar
// Version :
// Copyright : Do not try this at home ;P
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
using namespace std;
class table
{
public:
void process();
};
void table::process()
{
int c,i,n;
cout<<"enter the no.s till u want to see table of 3";
cin>>n;
for(i=0;i<=n;i++)
{
c=i%3;
if(c==0)
{
cout<<i<<endl;
}
}
}
int main()
{
cout << "!!!Made by PARASHAR!!!" << endl; // prints !!!Made by PARASHAR!!!
table p;
p.process();
return 0;
}
Comments
Post a Comment