need serious help!!!!!!

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2008
Posts: 2
Reputation: nabeelcool17 is an unknown quantity at this point 
Solved Threads: 0
nabeelcool17 nabeelcool17 is offline Offline
Newbie Poster

need serious help!!!!!!

 
0
  #1
May 7th, 2008
i have made an electricity bill program and wants to add graphics in it
mean when it need input from user it writes in graphics.............
so plz help me in making this.......
  1. #include<stdio.h>
  2. #include<conio.h>
  3. #include<iostream.h>
  4. void main()
  5. {
  6. int unit=3;
  7. int reading,previous,current,consumed,bill;
  8. cout<<"enter your meter no";
  9. cin>>reading;
  10. cout<<"enter previous redaing of meter";
  11. cin>>previous;
  12. cout<<"enter current reading of meter";
  13. cin>>current;
  14. consumed=current-previous;
  15. cout<<"units used in this month="<<consumed<<endl;
  16. bill=consumed*unit;
  17. cout<<"total bill="<<bill<<"Rs";
  18.  
  19.  
  20. getch();
  21.  
  22. closegraph();
  23.  
  24.  
  25. }
Last edited by Ancient Dragon; May 7th, 2008 at 7:36 pm. Reason: replaced quote tags with code tags
Attached Files
File Type: txt program.txt (466 Bytes, 6 views)
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,346
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1460
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: need serious help!!!!!!

 
0
  #2
May 7th, 2008
You mean a GUI program? If MS-Windows you have to write a windows program, not a console program. Here is a simple introduction tutorial. It requires a basic knowledge/understanding of C ir C++ language.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 59
Reputation: Dannyo329 is an unknown quantity at this point 
Solved Threads: 6
Dannyo329's Avatar
Dannyo329 Dannyo329 is offline Offline
Junior Poster in Training

Re: need serious help!!!!!!

 
0
  #3
May 8th, 2008
I changed some bits but, hey, it works for me.
I use Dev-C++

Try this:
  1. #include<stdio.h>
  2. #include<conio.h>
  3. #include<iostream>
  4. #include<windows.h>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. int unit=3;
  11. int reading,previous,current,consumed,bill;
  12.  
  13. cout<< "Enter your meter Number:\a";
  14. cin>>reading;
  15. cout<<"Enter previous redaing of meter:\a";
  16. cin>>previous;
  17. cout<<"Enter current reading of meter:\a";
  18. cin>>current;
  19. consumed=current-previous;
  20. cout<<"Units used in this month="<<consumed<<endl;
  21. bill=consumed*unit;
  22. cout<<"Total bill="<<bill<<"Rs";
  23.  
  24.  
  25. getch();
  26.  
  27. return 0;
  28.  
  29.  
  30. }
C programmers will get smashed by C++ programmers.
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: need serious help!!!!!!

 
0
  #4
May 8th, 2008
Well 'graphics' is a bit vague, what sort of graphics?

Perhaps a thermometer, running from 'green' to 'red' depending on how much energy has been used.

Or perhaps a series of measurements plotted as a line graph.

Now, what do YOU mean by graphics?
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 2
Reputation: nabeelcool17 is an unknown quantity at this point 
Solved Threads: 0
nabeelcool17 nabeelcool17 is offline Offline
Newbie Poster

Re: need serious help!!!!!!

 
0
  #5
May 11th, 2008
graphics mean it should appear in differnt colours means it looks like origional electricity bill on screen thats what i mean .........look at this program i cannot able to print input from user in this page...plz help....
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<conio.h>
  4. #include<graphics.h>
  5. #include<iostream.h>
  6. void main( )
  7.  
  8. {
  9. int gd = DETECT, gm, maxx, maxy;
  10. initgraph ( &gd, &gm, "c:\\tc\\bgi" ) ;
  11. maxx = getmaxx( ) ;
  12. maxy = getmaxy( ) ;
  13. rectangle ( 0, 0, maxx, maxy ) ;
  14. settextstyle(0,0,3);
  15. setcolor ( 10 ) ;
  16.  
  17. outtextxy ( 250,50, "WAPDA" ) ;
  18. settextstyle(0,0,2);
  19. outtextxy (270,80,"LESCO");
  20. settextstyle (0,0,1);
  21. outtextxy(100,120,"METER NO");
  22. settextstyle(0,0,2);
  23. outtextxy(400,200,"SAVE ENERGY");
  24. outtextxy(385,230,"SAVE PAKISTAN");
  25.  
  26. getch ();
  27. closegraph();
  28. }
Last edited by Ancient Dragon; May 11th, 2008 at 9:32 am. Reason: replaced quote tags with code tags
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC