Answer:
I want brainlyest though can I have it
Answer:
Following are the program in c language
#include <stdio.h> // header file
int main() // main method
{
char name[90]="mantasa"; // storing name
char add[90]="120 lal bangla mumbai"; // storing address
printf("\n Name:%s\nAddress:%s",name,add); // print name and address
return 0;
}
Output:
Name:mantasa
Address:120 lal bangla mumba
Explanation:
In this program we are declaring the two array of char type which will store the name and address . after that we display name and address.
Answer:
import java.util.Scanner;
public class num10 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter the numbers to add up. enter 999 to stop");
int num = in.nextInt();
int sum = 0;
while (num!=999){
sum = sum+num;
System.out.println("Enter the next number");
num = in.nextInt();
}
System.out.println("The sum is: "+sum);
}
}
Explanation:
The application is implemented in Java
A while loop is used to continously prompt user for inputs. The condition of the while loop is while (num!=999)
When the number 999 is entered, it displays the sum which is initialized to 0