numbers program with user define function and structures

Let us see the numbers program with user define function and structures.

#include<iostream>
using namespace std;
struct counting
{
	int i;
	int j;
	int k=0;

};
void displaydata(counting);
int main(){
	counting c;
	displaydata(c);
	return 0;
}
  void displaydata(counting c){
  	
	for(c.i=0;c.i<=10;c.i++){
		for(c.j=1;c.j<c.i;c.j++){
  	printf("%d",c.k);
  	c.k++;
  }
  	printf("\n");
  }

  }

Output

numbers program with user define function and structures

Prof.Fazal Rehman Shamil (Available for Professional Discussions)
1. Message on Facebook page for discussions,
2. Video lectures on Youtube
3. Email is only for Advertisement/business enquiries.