{ads}

6/recent/ticker-posts

Tally counter program using C++


Tally counter

In this program, Abdullah Saif creates a class called Ramzan. He takes two Variables and i. Both Variables are private. Variables can take input from the user if he wanted to continue and variables i can use for increment.

In the second part he creates a function named tasbiH. In this  function he used two-loop one is while and the other is a do-while loop.


#include<iostream>
using namespace std; class ramaZan { private: int a=0; int i; public: void tasbiH() { cout<<"\t\t\t***Welcome to shaHeeN's taSbiH ***\n\n"<<endl; cout<<"Dua-Go\n\t1-TalHa\n\t2-M.Abdullah\n\t3-Sudais BiN soHaiL\n\t4-Burhan Ali\n\t5-Abdullah saif\n\n"<<endl; cout<<"\t\t\t***INSTRUCTION***\n\n\t\t\t\t*****Press 4***** \n\t\t\t-For starting and to continue your tasBiH "<<endl; i=0; do { while(true) { cout<<"Your count is:"<<i+1<<"\n\n\t"<<endl; i++; break; } //cout<<"\t\t\t\t\tIf you want this again theN press 4"<<endl; cin>>a; } while(a==4); if(a!=4) { cout<<"\n\n\n\t\t\t\t***Your TasBiH ended on count NumBeR :"<<i<<"***\n\n\n"<<endl; cout<<"soRRy!\n\tYou have pressed a wrong key\n\tPlease start your program again and use the key of 4 \n\tTo continue your program. "<<endl; cout<<"\nThank you for using our TasBiH"<<endl; cout<<"Pray for us and for whole manKinD \n\t\t\t**STAY BLESSED**"<<endl; } } }; int main() { ramaZan r1; r1.tasbiH(); }

Post a Comment

0 Comments