User Profile
Collapse
-
But i will just know what is the largest after the loop, can u give me an example? -
I was trying to get the result as a decimal number, I did like this:
m/(float)(i)Leave a comment:
-
How to count how many times the largest number appear
The user input some numbers and i have to count how many times the largest number that he puts appears. I know how to get the largest, but how to count how many times it appear?
im a beginner in programminng.
When I was trying I did this code:
...Code:#include <stdio.h> #include <stdlib.h> int main(){ int i,j=0; float n,s,w; for(i=1;i<=5;i++){ -
How to get decimal division with 2 variables
How do i get this with decimal part?:
m/i??Code:for(i=1;i<=4;i++){ printf("%d\n",m); s = s + m/i m = m + 2; } -
Im a beginner in C too, system("pause") is used to stop the screen that appear to show the result. It is from the <stdlib.h> . So the screen doesn't close very fast. But it has nothing to do with the logic of what you want to do.Leave a comment:
-
Getting the smalles and the largest:
...Code:#include <stdio.h> #include <stdlib.h> int main(){ int i,s,x,lim; s=0; for(i=0;i<=5;i++){ printf("Type a value: "); scanf("%d",&x); if(x>=s) s = x; if(i==0) lim = x;Leave a comment:
-
Here:
...Code:#include <stdio.h> #include <stdlib.h> int main(){ int i,s,x; s=0; for(i=0;i<=5;i++){ printf("Digite um valor: "); scanf("%d",&x); if(x>=s) s = x; } printf("MAX: %dLeave a comment:
-
...Code:#include <stdio.h> #include <stdlib.h> int main(){ int i,s,x,lim; s=0; for(i=0;i<=5;i++){ printf("Digite um valor: "); scanf("%d",&x); if(x>=s) s = x; if(i==0) lim = x; if(x<lim) lim = x;Leave a comment:
No activity results to display
Show More
Leave a comment: