Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

can someone share projects? i want to play around with them (probably improve) also include what it does!

+1 vote
asked Jun 2, 2020 by Vince Mendoza (220 points)

3 Answers

+2 votes
answered Jun 2, 2020 by soroshasn (480 points)
selected Jun 4, 2020 by Vince Mendoza
 
Best answer
#include <stdio.h>
int max(int arr[], int n)
{int i;
    int max = arr[0];
    for (i = 1; i < n; i++)
    {if (arr[i] > max)
            max = arr[i];}
    return max;}
int min(int arr[], int n)
{int i;
    int min=arr[0];
    for (i=1;i<n;i++)
    {if (arr[i]<min)
           min = arr[i];}
    return min;}
int main()
{ int numberofcollumns;
    printf("enter the number of the collumns:\t");
    scanf("%d",&numberofcollumns);
    int arr[numberofcollumns];
    int index;
    for (int n=0;n<numberofcollumns;n++)
    {printf("enter the next number of your array:\t");
    scanf("%d",&index);
    arr[n]=index;}
    printf("Largest number in given array is :%d\n", max(arr, numberofcollumns));
    printf("smallest number in given array is :%d", min(arr, numberofcollumns));
    return 0;}

//this was my universityy class project
commented Jun 4, 2020 by Vince Mendoza (220 points)
reshown Jun 4, 2020 by Vince Mendoza
what language is this? i might as well learn new stuff
commented Jun 5, 2020 by soroshasn (480 points)
its C programming
can you improve it ?
commented Jan 29, 2021 by Jeff The Chicken (2,920 points)
definitely not a "universityy" that taught good grammar.
–2 votes
answered Jun 4, 2020 by kurbanuglu (110 points)
250.125 kayan noktalı sayıyı tek duyarlı (single precision) yöntemde yazınız
0 votes
answered Jun 4, 2020 by Shubham Yadav (180 points)
import numpy as np
ar1=[20,30,50]
ar2=[60,40,25]
arr2 = np.ar([60,40,25])
temp=[]
temp2=[]
for element in arr2:
    for i in range(3):
        if ar[i]>element:
            count=count+1
            temp=a[i]
            temp2=element

print(count)

#trying to compare the elements of ar1 with the ar2 and sort out the no of elements in ar1 that are greater than of ar2
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...