B can be 1,0,positive or negative.I have done this program.And that line
Code:
y=-y
y=-y
y=-y;
#include<iostream.h>
using namespace std;
int main(){
int x, y;
float product=1 ;
cout << "Enter a base number: ";
cin >> x;
cout << "Enter an integer exponent: ";
cin >> y;
int i = 1;
if (y<0)
{ y=-y;//HERE I AM
while (y>=i)
{
product
while(count<=-1*n){
while(n<0){
while(n<0){
y = y*x;
count--;
cout<<y;
while ( count <= n);
while ( count >= n);
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
printf("==========©©Andrei78©©==========");
printf("=======©All Rights Reserved©====");
#include<iostream>
using namespace std;
int main()
{
float a, b, c, d;
cout << "enter the base";
cin >> a;
cout << "enter the power";
cin >> b;
a=d;
do{
d*a;
}while(d<=b);
cout<<a<<"the
#include<iostream>
using namespace std;
int main()
{
int input;
int highest = 0;
int lowest = 0;
cout<< "Enter A Number (0 to stop the loop): \n";
cin >> input;
highest = input;
lowest = input;
while(input!=0)
{
cout
#include <iostream>
using namespace std;
int main ()
{
int a[5],y,max;
cout<<"Enter 5 numbers "<<endl;
for (y=0;y<5;y++)
{
cin>>a[y];
if (y==0) max=a[y];
#include <iostream>
using namespace std;
int main ()
{
int a[5],y,max;
for (i=0;y<5;i++)
{
cin>>a[i];
if (y==0) max=a[y];
if (a[y]>max) max=a[];
}
cout<<"max numb is:"<<max;
system("pause");
Leave a comment: