1. Engineering
  2. Computer Science
  3. please convert this c language code into simple assembly x86...

Question: please convert this c language code into simple assembly x86...

Question details

Please convert this C++ Language code into Simple Assembly x86 Code Language (Microsoft Visual Studios 2017):

#include<iostream>// header file

using namespace std;

int main()

{

     int t;

    cout<<"enter the number of times you want to calculate: ";

   cin>>t;

while(t--)

{

          int N,a,d;// variable declaration

          cout<<"Enter the number of Integers : ";

          cin>>N;

          cout<<endl; //for newline

          cout<<"enter the start integer :";

          cin>>a;

          cout<<endl;

       cout<<"enter the difference between integer : ";

        cin>>d;

       cout<<endl;

       int s = (N*(2*a + (N-1)*d))/2;

       cout<<"N = "<<N<<", "<<"a = "<<a<<" ,"<<" d = "<<d<<" ,"<<" sum = "<<s<<endl;

   }

}

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution