Advertisement
Mary_99

task3

Dec 30th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4. /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  5.  
  6. int main(int argc, char *argv[])
  7. {
  8.     int m;
  9.     int n;
  10.     int i, a;
  11.    
  12.    
  13.     do{
  14.     printf(" Enter integer n= ");
  15.     scanf(" %d", &n);
  16.     printf("Enter integer m= ");
  17.     scanf(" %d", &m);
  18.     }while(isdigit(n) && isdigit(m));
  19.    
  20.     for(i=0;i<m;i++)
  21.     {
  22.     a=pow(i, n);
  23.     printf(" %d + ", a);
  24.     }  
  25.    
  26.    
  27.  
  28.     return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement