Posts

Showing posts from June, 2021

SCHOLARSHIP

Image
  WHAT IS SCHOLARSHIP An  amount of money that is given to a person who has passed an exam or won a competition, in order to help pay for his/her studies. A  scholarship  is an award of financial aid for a student to further their education at a private elementary or secondary school, or a private or public post-secondary college, university, or other academic institution. ...  Scholarship  criteria usually reflect the values and goals of the donor or founder of the award   for school and college For colleges and universities, scholarships are  financial aid awards  designed to help students pay for an undergraduate degree. Sometimes a scholarship is a one-time check. Other school scholarships are  renewable  and provide money for students each semester or school year You  can  use your  scholarship money  for tuition . Since  scholarships  are meant to help you pay for school, you  can  almo...

Write a c++ program to display numbers from 1 to infinite by using for loop .

Image
  /* Write a c++ program to display numbers  from 1 to infinite by using for loop  */ #include <iostream> using namespace std ; int main() {       int i, n ; /* note : for making infinite loop ,there must be  such a condition which never be wrong  ex : 2>1 */ for(i= 1; 2>1 ; i++) // 2>1 always true    {  cout<< i <<"  ,  "; }     return 0; } output  1, 2  ,3, 4 ,5,..........................infinite    more exercise

Write a c++ program to display numbers which is divisible by 2 as well 3 from 6 to n by using and operator .

Image
/*Q3) Write a c++ program to display numbers which is divisible by 2 as well 3 from 6 to n by using  for loop and operator     */ #include <iostream> using namespace std ; int main() {       int i , n ;    cout<< "upto n"<<endl;    cout<<"Enter the number n (more than 6) = ";    cin>>n;        for( i= 6; i <=n ; i++)    {  if (i%2==0 && i%3==0)        {  cout<<i<<" , "; }     }    return 0; } output   up to n Enter the number n (more than 6) = 45 6 , 12 , 18 , 24 , 30 , 36 , 42 ,     more exercise

Write a c++ program to display numbers which is divisible by 2 as well 3 from 6 to n by using For loop and if else statement .

Image
/* Write a c++ program to display numbers which is divisible by 2 as well 3 from 6 to n by using a) For loop and if-else statement  */ #include <iostream> using namespace std ; int main () {  int i ,n  ;     cout<< "upto n"<<endl ; cout<<"Enter the n( more than 6 ) "; cin>>n;    for( i= 6; i <= n ; i++)    {  if (  i %2 ==0   )      {    if (i %3==0)        { cout<< i <<" , "; }     }    }      return 0; } output : upto n Enter the n( more than 6 )  = 45 6 , 12 , 18 , 24 , 30 , 36 , 42 ,  more exercise

Write a program that prompts the user to input a positive integer. It should then print the multiplication table of that number.

Image
 Write a program that prompts the user to input a positive integer. It should then print the multiplication table of that number. #include<iostream> using namespace std; int main() {  int i ,n , table ;  cout<<" Table of n "<<endl;   cout<<"Enter the n of finding table = ";    cin>>n;    cout<<"Table of "<<n<<" : "<<endl;    for( i=1 ; i<=10 ; i++)    {   cout<<n<<" * "<<i<<" = "<< (n*i)<<endl; }       return 0; } OUTPUT Table of n  Enter the n of finding table = 8 Table of 8 :  8 * 1 = 8 8 * 2 = 16 8 * 3 = 24 8 * 4 = 32 8 * 5 = 40 8 * 6 = 48 8 * 7 = 56 8 * 8 = 64 8 * 9 = 72 8 * 10 = 80

Write a program to add even numbers up to nh by using for loop in c++ language.

Image
Write a program to add even numbers  up to nh  by using for loop in c++ language.  #include<iostream> using namespace std; int main() {        int i , n, sum =0;       cout<<"Add even numbers  up to nth term  "<<endl;       cout<<"Enter the number of term (nth) = ";       cin>>n;            for(i=2;i<=n;i=i+2 )//  intialization i=2;                      // upgradation ,increment by 2      {  sum =sum + i ;  }      cout<<"sum of "<<n<<"th term of only even number = "<<sum;  return 0; } OUTPUT Add even numbers  up to nth term   Enter the number of term (nth) = 15 the sum of 15th term of only even number = 56 Write a program that prompts the user to input a positive integer. It should then print th...

Write a program to add natural numbers up to 20 by using for loop in c++ language.

Image
  Write a program to add natural numbers up to nth term by using for loop in c++ language.  #include <iostream> using namespace std; int main() {     int sum =0  ,n ;     cout<<"Enter the nth term  n = ";     cin>>n;      for(int i =1;i<=n; i++)     {  sum =sum +i ;}     cout<<"sum of  "<<n<<"th term is = "<<sum    return 0; } OUTPUT Enter the nth term  n = 20 the sum of  20th term is = 210 Write a program that prompts the user to input a positive integer. It should then print the multiplication table of that number.

Introduction of C++,History of c++, limitation of C, Uses of c++ ,Compiler

Image
  Introduction of C++   ·        We should   to   know a bit of information about the history of C++. This means what exactly is C plus plus?   Now all of you know that a computer is an electronic device that can perform many computational task. But since it is a machine, these computers really can't do anything on their own . so to get any job done using the computer we need to give instructions to this computer and according to our instructions, these computers will work. These instructions which are given to this computer are called as the “Program“ and the person who is going to write these instructions or who is going to give this instructions is called as a “”  Programmer” Now the language in which these instructions are written or these programs are written is called as the “ Programming Language”. So here the programmer will use any of the programming language available and write the  co...