C++ Homework Help

Discussion in 'C++' started by brp4e, Jun 26, 2010.

  1. brp4e

    brp4e New Member

    Joined:
    Jun 26, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    I'm trying to do this code for my school assignment and if you guys could help me that would be awesome.

    Code:
    #include "stdafx.h"
    #include <iostream>
    
    using namespace std;
    
    int main(array<System::String ^> ^args)
    {
        char one;
    	char two;
    	
    	cout << "Does the computer beep on startup(Y/N)? " ;
    	cin >> one;
    
    	cout << "Does the hard drive spin (Y/N)? ";
    	cin >> two;
    
    	if ((one == "y") && (two == "n"))
    		cout << "Check drive contacts";
    
    	else if ((one == "y") && (two == "y"))
    		cout << "Contact tech support";
    
    	else if ((one == "n") && (two == "n"))
    		cout << "Bring computer to repair centre";
    
    	else ((one == "n") && (two == "y"));
    		cout << "Check the speaker connections";
    
    	cout << endl;
    	system("Pause");
        return 0;
    }
     
  2. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    2
    Trophy Points:
    0
    First we do not other peoples homework but yes we can help if you explain where you are stuck
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice