Posts

Showing posts from April, 2021

Write table in c ++ source code

 Table code In c++ #include <iostream> using namespace std; int main(){ int i = 1; int b; cout<< "enter  a number " ; cin>>b; if (b<100){ for ( int i = 1; i<11; i++){ cout<<i*b<<endl; } } else { cout<< "invalid num" ;} }

write a table for c++ use for loop

  Write table any number in this program  ==========Here is the code==========   #include <iostream> using namespace std; int main(){ int a = 1; int b; cout<< "Enter the number want table " <<endl; cin>>b; for ( int a =1; a<=10; a++){ cout<<a*b<<endl; } } Made by skeleton programmer 

Option choosing game made for c++

  Choosing a option game make by c++ So this a choose a option and get the output on the screen this is very interesting game.          Code #include <iostream> using namespace std; int main() { int a=1, b=2, c=3, d=4; int x; cout<< "choose a option " <<endl; cout<< "1\n2\n3\n4" <<endl; cout << "write your options " ; cin>>x; switch (x) { case 1: cout<< "you are ugly" ; break ; case 2: cout<< "you are intelligent " ; break ; case 3: cout<< "OK you are intelligent but you don't speak" ; break ; case 4: cout<< "OK you are dumb " ; break ; } cout << "\n====Thanks for useing====" ; return 0; } So this is the make by skeleton programmer

Find the value of sphere a program make c++

My code here is Find the Value of sphere.                  Here the code     #include <stdio.h> int main() { int tw = 4, pi1= 22, pi2= 7, r; printf( "Enter the 'r' : " ); scanf( "%d" ,&r); float res = tw*pi1*r*r; float result = res/pi2; printf( "The Area of sphere is : %f" ,result); }