Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number
Answers were Sorted based on User's Feedback
Answer / aroosa naseer
import java.util.*;
class ArraysMax{
public static void main(String args[]){
int a[]=new int[10];
int max=0;
int temp;
Scanner scan=new Scanner(System.in);
System.out.println("Enter 10 numbers to find
out maximum");
for(int i=0;i<a.length;i++){
a[i]=scan.nextInt();
}
for (int i = 0; i < a.length; i++) {
while(a[i]>max){
max=a[i];
}
}
System.out.println("maximum number is= " + max);
}
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / g mohan kumar
import java.util.*;
class arrmax{
public static void main(String args[]){
int a[]=new int[10];
int max=0;
int temp;
Scanner s=new Scanner(System.in);
System.out.println("Enter 10 numbers to find out maximum");
for(int i=0;i<a.length;i++){
a[i]=s.nextInt();
}
for (int i = 0; i < a.length; i++) {
while(a[i]>max){
max=a[i];
}
}
System.out.println("this number is maximun number "+max);
}
}
| Is This Answer Correct ? | 0 Yes | 0 No |
main() { int i=400,j=300; printf("%d..%d"); }
how to check whether a linked list is circular.
Write a procedure to implement highlight as a blinking operation
main() { float i=1.5; switch(i) { case 1: printf("1"); case 2: printf("2"); default : printf("0"); } }
PROG. TO PRODUCE 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
write a c program to print magic square of order n when n>3 and n is odd?
C program to print magic square of order n where n > 3 and n is odd
void main() { int i; char a[]="\0"; if(printf("%s\n",a)) printf("Ok here \n"); else printf("Forget it\n"); }
#define a 10 void foo() { #undef a #define a 50 } int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } explain the answer
#define f(g,g2) g##g2 main() { int var12=100; printf("%d",f(var,12)); }
write a program for area of circumference of shapes
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }