diff --git a/new file 22 b/new file 22 new file mode 100644 index 0000000..7d95db3 --- /dev/null +++ b/new file 22 @@ -0,0 +1,20 @@ +#include + +int main() +{ + int j, start, end; + + /* Input start and end limit from user */ + printf("Enter starting value: "); + scanf("%d", &start); + printf("Enter end value: "); + scanf("%d", &end); + + /** Run loop from 'start' to 'end' and decrement by 1 in each iteration */ + for(j=start; j>=end; j--) + { + printf("%d\n", j); + } + + return 0; +} diff --git a/queue new b/queue new new file mode 100644 index 0000000..4a086fd --- /dev/null +++ b/queue new @@ -0,0 +1,17 @@ + queue gquiz; + gquiz.push(10); + gquiz.push(20); + gquiz.push(30); + + cout << "The queue gquiz is : "; + showq(gquiz); + + cout << "\ngquiz.size() : " << gquiz.size(); + cout << "\ngquiz.front() : " << gquiz.front(); + cout << "\ngquiz.back() : " << gquiz.back(); + + cout << "\ngquiz.pop() : "; + gquiz.pop(); + showq(gquiz); + + return 0;