dimanche 7 octobre 2018

How to use a pointer of class i am a beginner level programmer can any one help me with the solve of the question?

Write a code in C++ which will take two numbers n and m and create n number rows of random numbers between [1...50] for each value of m. Lets n = 3 and m = 3 5 2

  • row 1: 34 56 7 //first row contains m = 3 values
  • row 2: 12 17 39 23 1 //second row contains m = 5 values
  • row 3: 2 49 //third row contains m = 2 values

*note: declare a class

class RanNum { public: int n; RanNum *side; RanNum *down; };

Aucun commentaire:

Enregistrer un commentaire