View Single Post
ישן 29-01-06, 19:20   # 1
Matchs
תודה על תרומתך.
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
מיקום: מרכז.
הודעות: 935

Matchs לא מחובר  

Exclamation בניתי מחשבון ב-C++ מקודם, דעתכם?

גרסא 1.6 בטא, בקרוב אני אתן בו בלי הגבלה של מספרים (כרגע יש 2).
הקוד מקור:
PHP קוד:
#include   <iostream.h>
#include   <conio.h>

// This program By Rotem.
// All copy-right to me © 2006.
// Calculate in C++, Version 1.6 Beta!
 
int main()
{
    
float xy;
    
char action;
    
    
cout<<"Welcome to my calculate - Version 1.6 Beta!";
    
cout<<"\nI hope that you use in it for test..";
    
cout<<"\n\nPlease input the first number: ";
    
cin>>x;
    
cout<<"Please input the second number: ";
    
cin>>y;
    
    
cout<<"Please select action (+, -, /, *): ";
    
cin>>action;
    
    switch(
action)
    {
           case 
'+':
           
cout << << "+" << << " = " << x+y;
           break;
           
           case 
'-':
           
cout << << "-" << << " = " << x-y;
           break;
           
           case 
'/':
           
cout << << ":" << << " = " << x/y;
           break;
                
           case 
'*':
           
cout << << "*" << << " = " << x*y;
           break;
    }
    
    
cout<<"\n\nThis program by Rotem (c) 2006!";
    
cout<<"\nWant a some program? So learn C++ ;)";
    
    
getch();
    return 
0;

ולינק לתוכנה מקומפלת (ע"י Dev-C++): http://rapidshare.de/files/12104274/calculate.exe.html.

תהנו,
Matchs.
__________________
לפניות, אנא השאירו לי הודעה פרטית.
Matchs.

Last edited by Matchs; 29-01-06 at 19:51..
  Reply With Quote