Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how to add class in c++

+1 vote
asked Aug 19, 2018 by kaushi (130 points)

2 Answers

0 votes
answered Aug 24, 2018 by mudaliar.aditya
did u u mean how to write a new class or use an already class of c++.
followiing i have created a class A

class A

{

   public:

      A()

      {

      }

    ~A()

      {

      }

}
0 votes
answered Aug 28, 2018 by fanny fanny video (guri) (140 points)

#include <stdio.h>

int main()
{
    int r,i;
   printf("enter rows r:");
   scanf("%d",&r);
   for(i=1;i<=r;i++)
   {
     if(i%2==1)
     {
       printf("%d%d%d%d\n",i,i,i,i+1);
       }
     else
      { printf("%d%d%d%d\n",i+1,i,i,i);
       }
   }
return 0;
}

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...