Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

My first (sorta) program in C++

$
0
0
Hey this is my first program using C++ any tips to a newbie would be appeciated
#include <iostream>

using namespace std;

int main()
{
    int a;
    int b;
    int sum;
    int rem;

    cout << "division, type in a number \n";
    cin >> a;

    cout << "tpye in another number \n";
    cin >> b;

    rem = a % b;
    sum = a / b;
    cout << "your number is " << sum << " your rem is " << rem << endl;



               return 0;
}

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>