you can use the condition statement like for(i=0:i<=10;i++)
public class Sum {
public static void main(String[] args) {
int sum=0;
for(int i=1; i<=10; i++)
sum+=i;
System.out.println(sum);
}
}
ghfj
write a program in C that prompts the user with the following lines: a) Add two integers c) Compare two integers for the larger t) Test an integers for odd or even q) Quit
Write a program to find the number and sum of all integers from 100 to 300 that are divisible by 11
This is not a question so you do not need to use a question mark at the end of your sentence.
#include<iostream.h> #include<conio.h> void main() { for(int i=1;i<=10;i++) { cout<<i*i; } getch(); }
ghfj
Write your program and if you are having a problem post it here with a description of the problem you are having. What you are asking is for someone to do your homework for you.
write a program in C that prompts the user with the following lines: a) Add two integers c) Compare two integers for the larger t) Test an integers for odd or even q) Quit
Write a program to find the number and sum of all integers from 100 to 300 that are divisible by 11
int x= 1; int y= 2;
a=153 a=n%10;
#include<stdio.h> #include<conio.h> void main() { int i=1,sum=0; clrscr(); while(i<10000) { if((i%3==0)(i%5==0)(i%7==0)) { sum=sum+i; } i++; } printf("\nThe sum is%d",sum); getch(); }
totalScore = verbalScore mathScore
Write a program in C for showing working of different logical operator in C.Your program should guide users with proper message/menu on the console. (5 Marks)
This is not a question so you do not need to use a question mark at the end of your sentence.
i love u darling
#include<stdio.h> main() { int i; for(i=1;i<=50;i++) { if (i%5!=0) printf("\n %d",i); } }