numbers program with user define function and structures
Let us see the numbers program with user define function and structures.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #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