Answers for "C code to MIPS assembly converter online"

0

C code to MIPS assembly converter online

#include <iostream>
Posted by: Guest on September-24-2020
0

C code to MIPS assembly converter online

#include <iostream>  
using namespace std;  
int main(void) {  
  int n1=0,n2=1,n3,i,number,num,a,b,opt,x,y;
  cout<<"enter your option";
  cin>>opt;
if(opt==1){
 cout<<"Enter the number of elements: ";    
 cin>>number;    
 cout<<n1<<" "<<n2<<" "; //printing 0 and 1    
 for(i=2;i<number;++i) //loop starts from 2 because 0 and 1 are already printed    
 {    
  n3=n1+n2;    
  cout<<n3<<" ";    
  n1=n2;    
  n2=n3; 
 }
}
else if(opt==2) {
 
 for( a = 1; a <= 5; ++a)
    {
        for( b = 1; b <= a; ++b)
        {
            cout << "* ";
        }
        cout << "\n";
    } 

} else if(opt==3){
      cout<<"Enter X coordinate";
        cin>>x;
        cout<<"Enter y coordinate";
        
        
        //checking for quadrants and axis
        if(x==0)
            cout<< "lies on y axis";
        else if(y==0)
            cout<< "lies on x axis";
        else if(x>0&&y>0)
            cout<< "lies in 1st quadrant";
        else if(x<0&&y>0)
            cout<<"lies in 2nd quadrant";
        else if(x<0&&y<0)
            cout<<"lies in 3rd quadrant";
        else if(x>0&&y<0)
            cout<<"lies in 4th quadrant";
        else
            cout<<"lies on the origin";
        }
        return 0;   
    }
Posted by: Guest on June-11-2021
0

c code to mips assembly converter online

for (i=1; i<=N; i++) {
a[i] = c[i]*16; }
Posted by: Guest on September-14-2021
0

c code to mips assembly converter online

int i=0, j=0, k=2;
while(i==j){
i++; j++;
if(i>>2==k)
 j=0;
 }
Posted by: Guest on September-05-2021
0

c code to mips assembly converter online

#include <stdio.h>
#include <stdlib.h>
 
int main(void)
{
	printf("Olá Mundo!\n");
	return 0;
}
Posted by: Guest on October-02-2021
0

c code to mips assembly converter online

int myHack (int x) {
    int i=100;
    int y=50;
    while (i>0){
        if (y<100) {
            y = y * 2;
        }else{
            y = func(x, y);
            x++;
        }
        i--;
    }
    return y;
}
Posted by: Guest on September-06-2021

Code answers related to "C code to MIPS assembly converter online"

Browse Popular Code Answers by Language