“C à convertisseur d'assemblage MIPS” Réponses codées

C à convertisseur d'assemblage MIPS

ngeElements
void main()
{
    int arraysize = 11;
    int numbers[arraysize];
    int howMany, theNthSmallest, index, i;
    
    printf("Specify how many times to repeat:\n");
    scanf("%d", &howMany);

    printf("Enter an integer for the Nth smallest:\n");
     
     //read an integer from a user input
     scanf("%d", &index);

     //if the index is not within the range, 
     //and if it is smaller, set it to 1, if it is larger,  
     //set it to the size of the array.
     if (index < 1)
     {
        index = 1;   
     }
     else if (index > arraysize)
     {
        index = arraysize;       
     }

    i=0;
    while (i < howMany)
    {
        theNthSmallest = findTheNthSmallest(numbers, arraysize, index);  
        printf("The %d(-th) smallest number is %d\n\n", index, theNthSmallest);         
        i++;
    }
  }
Yaci Zhu

C à convertisseur d'assemblage MIPS

int v1=5,v2=2,v3=9,v4=1;
	
	int sum, sub;
	
	sum=v1+v2;
	
	sub=v3-v4;
	
	if(sum>sub){
		printf("%d",sum);
	}
	else{
		printf("%d",sub);
	}
Aman Saeed

Réponses similaires à “C à convertisseur d'assemblage MIPS”

Questions similaires à “C à convertisseur d'assemblage MIPS”

Plus de réponses similaires à “C à convertisseur d'assemblage MIPS” dans C

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code